@0xslots/sdk 0.7.0 → 0.8.1

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/dist/index.js CHANGED
@@ -32,6 +32,7 @@ var SlotFieldsFragmentDoc = gql`
32
32
  recipient
33
33
  recipientAccount {
34
34
  id
35
+ type
35
36
  slotCount
36
37
  occupiedCount
37
38
  }
@@ -54,6 +55,7 @@ var SlotFieldsFragmentDoc = gql`
54
55
  occupant
55
56
  occupantAccount {
56
57
  id
58
+ type
57
59
  slotCount
58
60
  occupiedCount
59
61
  }
@@ -89,9 +91,64 @@ var GetAccountsDocument = gql`
89
91
  }
90
92
  }
91
93
  ${AccountFieldsFragmentDoc}`;
94
+ var GetSlotDeployedEventsDocument = gql`
95
+ query GetSlotDeployedEvents($first: Int!, $skip: Int, $orderBy: SlotDeployedEvent_orderBy, $orderDirection: OrderDirection, $where: SlotDeployedEvent_filter, $block: Block_height) {
96
+ slotDeployedEvents(
97
+ first: $first
98
+ skip: $skip
99
+ orderBy: $orderBy
100
+ orderDirection: $orderDirection
101
+ where: $where
102
+ block: $block
103
+ ) {
104
+ id
105
+ slot {
106
+ id
107
+ }
108
+ recipient
109
+ currency {
110
+ ...CurrencyFields
111
+ }
112
+ manager
113
+ mutableTax
114
+ mutableModule
115
+ taxPercentage
116
+ module
117
+ liquidationBountyBps
118
+ minDepositSeconds
119
+ deployer
120
+ timestamp
121
+ blockNumber
122
+ tx
123
+ }
124
+ }
125
+ ${CurrencyFieldsFragmentDoc}`;
92
126
  var GetRecentEventsDocument = gql`
93
- query GetRecentEvents($first: Int!) {
94
- boughtEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
127
+ query GetRecentEvents($first: Int!, $skip: Int) {
128
+ slotDeployedEvents(
129
+ first: $first
130
+ skip: $skip
131
+ orderBy: timestamp
132
+ orderDirection: desc
133
+ ) {
134
+ id
135
+ slot {
136
+ id
137
+ }
138
+ recipient
139
+ currency {
140
+ ...CurrencyFields
141
+ }
142
+ deployer
143
+ timestamp
144
+ tx
145
+ }
146
+ boughtEvents(
147
+ first: $first
148
+ skip: $skip
149
+ orderBy: timestamp
150
+ orderDirection: desc
151
+ ) {
95
152
  id
96
153
  slot {
97
154
  id
@@ -107,7 +164,12 @@ var GetRecentEventsDocument = gql`
107
164
  timestamp
108
165
  tx
109
166
  }
110
- releasedEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
167
+ releasedEvents(
168
+ first: $first
169
+ skip: $skip
170
+ orderBy: timestamp
171
+ orderDirection: desc
172
+ ) {
111
173
  id
112
174
  slot {
113
175
  id
@@ -120,7 +182,12 @@ var GetRecentEventsDocument = gql`
120
182
  timestamp
121
183
  tx
122
184
  }
123
- liquidatedEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
185
+ liquidatedEvents(
186
+ first: $first
187
+ skip: $skip
188
+ orderBy: timestamp
189
+ orderDirection: desc
190
+ ) {
124
191
  id
125
192
  slot {
126
193
  id
@@ -134,7 +201,12 @@ var GetRecentEventsDocument = gql`
134
201
  timestamp
135
202
  tx
136
203
  }
137
- priceUpdatedEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
204
+ priceUpdatedEvents(
205
+ first: $first
206
+ skip: $skip
207
+ orderBy: timestamp
208
+ orderDirection: desc
209
+ ) {
138
210
  id
139
211
  slot {
140
212
  id
@@ -147,7 +219,12 @@ var GetRecentEventsDocument = gql`
147
219
  timestamp
148
220
  tx
149
221
  }
150
- depositedEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
222
+ depositedEvents(
223
+ first: $first
224
+ skip: $skip
225
+ orderBy: timestamp
226
+ orderDirection: desc
227
+ ) {
151
228
  id
152
229
  slot {
153
230
  id
@@ -160,7 +237,12 @@ var GetRecentEventsDocument = gql`
160
237
  timestamp
161
238
  tx
162
239
  }
163
- withdrawnEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
240
+ withdrawnEvents(
241
+ first: $first
242
+ skip: $skip
243
+ orderBy: timestamp
244
+ orderDirection: desc
245
+ ) {
164
246
  id
165
247
  slot {
166
248
  id
@@ -173,7 +255,12 @@ var GetRecentEventsDocument = gql`
173
255
  timestamp
174
256
  tx
175
257
  }
176
- taxCollectedEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
258
+ taxCollectedEvents(
259
+ first: $first
260
+ skip: $skip
261
+ orderBy: timestamp
262
+ orderDirection: desc
263
+ ) {
177
264
  id
178
265
  slot {
179
266
  id
@@ -186,7 +273,12 @@ var GetRecentEventsDocument = gql`
186
273
  timestamp
187
274
  tx
188
275
  }
189
- taxUpdateProposedEvents(first: $first, orderBy: timestamp, orderDirection: desc) {
276
+ taxUpdateProposedEvents(
277
+ first: $first
278
+ skip: $skip
279
+ orderBy: timestamp
280
+ orderDirection: desc
281
+ ) {
190
282
  id
191
283
  slot {
192
284
  id
@@ -197,6 +289,7 @@ var GetRecentEventsDocument = gql`
197
289
  }
198
290
  moduleUpdateProposedEvents(
199
291
  first: $first
292
+ skip: $skip
200
293
  orderBy: timestamp
201
294
  orderDirection: desc
202
295
  ) {
@@ -210,6 +303,7 @@ var GetRecentEventsDocument = gql`
210
303
  }
211
304
  pendingUpdateCancelledEvents(
212
305
  first: $first
306
+ skip: $skip
213
307
  orderBy: timestamp
214
308
  orderDirection: desc
215
309
  ) {
@@ -428,9 +522,10 @@ var GetPriceUpdatedEventsDocument = gql`
428
522
  }
429
523
  ${CurrencyFieldsFragmentDoc}`;
430
524
  var GetSlotActivityDocument = gql`
431
- query GetSlotActivity($slotId: String!, $first: Int!) {
525
+ query GetSlotActivity($slotId: String!, $first: Int!, $skip: Int) {
432
526
  boughtEvents(
433
527
  first: $first
528
+ skip: $skip
434
529
  orderBy: timestamp
435
530
  orderDirection: desc
436
531
  where: {slot: $slotId}
@@ -449,6 +544,7 @@ var GetSlotActivityDocument = gql`
449
544
  }
450
545
  releasedEvents(
451
546
  first: $first
547
+ skip: $skip
452
548
  orderBy: timestamp
453
549
  orderDirection: desc
454
550
  where: {slot: $slotId}
@@ -464,6 +560,7 @@ var GetSlotActivityDocument = gql`
464
560
  }
465
561
  liquidatedEvents(
466
562
  first: $first
563
+ skip: $skip
467
564
  orderBy: timestamp
468
565
  orderDirection: desc
469
566
  where: {slot: $slotId}
@@ -480,6 +577,7 @@ var GetSlotActivityDocument = gql`
480
577
  }
481
578
  priceUpdatedEvents(
482
579
  first: $first
580
+ skip: $skip
483
581
  orderBy: timestamp
484
582
  orderDirection: desc
485
583
  where: {slot: $slotId}
@@ -495,6 +593,7 @@ var GetSlotActivityDocument = gql`
495
593
  }
496
594
  depositedEvents(
497
595
  first: $first
596
+ skip: $skip
498
597
  orderBy: timestamp
499
598
  orderDirection: desc
500
599
  where: {slot: $slotId}
@@ -510,6 +609,7 @@ var GetSlotActivityDocument = gql`
510
609
  }
511
610
  withdrawnEvents(
512
611
  first: $first
612
+ skip: $skip
513
613
  orderBy: timestamp
514
614
  orderDirection: desc
515
615
  where: {slot: $slotId}
@@ -525,6 +625,7 @@ var GetSlotActivityDocument = gql`
525
625
  }
526
626
  taxCollectedEvents(
527
627
  first: $first
628
+ skip: $skip
528
629
  orderBy: timestamp
529
630
  orderDirection: desc
530
631
  where: {slot: $slotId}
@@ -540,6 +641,7 @@ var GetSlotActivityDocument = gql`
540
641
  }
541
642
  taxUpdateProposedEvents(
542
643
  first: $first
644
+ skip: $skip
543
645
  orderBy: timestamp
544
646
  orderDirection: desc
545
647
  where: {slot: $slotId}
@@ -551,6 +653,7 @@ var GetSlotActivityDocument = gql`
551
653
  }
552
654
  moduleUpdateProposedEvents(
553
655
  first: $first
656
+ skip: $skip
554
657
  orderBy: timestamp
555
658
  orderDirection: desc
556
659
  where: {slot: $slotId}
@@ -562,6 +665,7 @@ var GetSlotActivityDocument = gql`
562
665
  }
563
666
  pendingUpdateCancelledEvents(
564
667
  first: $first
668
+ skip: $skip
565
669
  orderBy: timestamp
566
670
  orderDirection: desc
567
671
  where: {slot: $slotId}
@@ -648,6 +752,9 @@ function getSdk(client, withWrapper = defaultWrapper) {
648
752
  GetAccounts(variables, requestHeaders, signal) {
649
753
  return withWrapper((wrappedRequestHeaders) => client.request({ document: GetAccountsDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "GetAccounts", "query", variables);
650
754
  },
755
+ GetSlotDeployedEvents(variables, requestHeaders, signal) {
756
+ return withWrapper((wrappedRequestHeaders) => client.request({ document: GetSlotDeployedEventsDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "GetSlotDeployedEvents", "query", variables);
757
+ },
651
758
  GetRecentEvents(variables, requestHeaders, signal) {
652
759
  return withWrapper((wrappedRequestHeaders) => client.request({ document: GetRecentEventsDocument, variables, requestHeaders: { ...requestHeaders, ...wrappedRequestHeaders }, signal }), "GetRecentEvents", "query", variables);
653
760
  },
@@ -819,6 +926,10 @@ var SlotsClient = class {
819
926
  return this.query("getModules", () => this.sdk.GetModules(...args));
820
927
  }
821
928
  // Event queries
929
+ /** Fetch slot deployed events with optional filters. */
930
+ getSlotDeployedEvents(...args) {
931
+ return this.query("getSlotDeployedEvents", () => this.sdk.GetSlotDeployedEvents(...args));
932
+ }
822
933
  /** Fetch bought events with optional filters. */
823
934
  getBoughtEvents(...args) {
824
935
  return this.query("getBoughtEvents", () => this.sdk.GetBoughtEvents(...args));
@@ -1234,6 +1345,6 @@ function createSlotsClient(config) {
1234
1345
  return new SlotsClient(config);
1235
1346
  }
1236
1347
 
1237
- export { AccountFieldsFragmentDoc, CurrencyFieldsFragmentDoc, GetAccountDocument, GetAccountsDocument, GetBoughtEventsDocument, GetDepositedEventsDocument, GetFactoryDocument, GetLiquidatedEventsDocument, GetModulesDocument, GetPriceUpdatedEventsDocument, GetRecentEventsDocument, GetReleasedEventsDocument, GetSettledEventsDocument, GetSlotActivityDocument, GetSlotDocument, GetSlotsByOccupantDocument, GetSlotsByRecipientDocument, GetSlotsDocument, GetTaxCollectedEventsDocument, GetWithdrawnEventsDocument, SUBGRAPH_URLS, SlotFieldsFragmentDoc, SlotsChain, SlotsClient, SlotsError, createSlotsClient, getSdk };
1348
+ export { AccountFieldsFragmentDoc, CurrencyFieldsFragmentDoc, GetAccountDocument, GetAccountsDocument, GetBoughtEventsDocument, GetDepositedEventsDocument, GetFactoryDocument, GetLiquidatedEventsDocument, GetModulesDocument, GetPriceUpdatedEventsDocument, GetRecentEventsDocument, GetReleasedEventsDocument, GetSettledEventsDocument, GetSlotActivityDocument, GetSlotDeployedEventsDocument, GetSlotDocument, GetSlotsByOccupantDocument, GetSlotsByRecipientDocument, GetSlotsDocument, GetTaxCollectedEventsDocument, GetWithdrawnEventsDocument, SUBGRAPH_URLS, SlotFieldsFragmentDoc, SlotsChain, SlotsClient, SlotsError, createSlotsClient, getSdk };
1238
1349
  //# sourceMappingURL=index.js.map
1239
1350
  //# sourceMappingURL=index.js.map