@carddb/core 0.1.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/README.md +85 -0
- package/dist/index.cjs +1177 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +840 -0
- package/dist/index.d.ts +840 -0
- package/dist/index.js +1123 -0
- package/dist/index.js.map +1 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @carddb/core
|
|
2
|
+
|
|
3
|
+
Core types and utilities for CardDB JavaScript clients.
|
|
4
|
+
|
|
5
|
+
> **Note:** This is an internal package. You should use `@carddb/node` or `@carddb/browser` instead.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This package provides:
|
|
10
|
+
|
|
11
|
+
- **Types**: TypeScript type definitions for all CardDB resources
|
|
12
|
+
- **Errors**: Error classes for different error scenarios
|
|
13
|
+
- **Operators**: Filter operator helper functions
|
|
14
|
+
- **FilterBuilder**: Builder pattern for constructing filters
|
|
15
|
+
- **QueryBuilder**: GraphQL query construction
|
|
16
|
+
- **Collection**: Paginated result handling with async iteration
|
|
17
|
+
|
|
18
|
+
## Exports
|
|
19
|
+
|
|
20
|
+
### Types
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type {
|
|
24
|
+
CardDBConfig,
|
|
25
|
+
Publisher,
|
|
26
|
+
Game,
|
|
27
|
+
Dataset,
|
|
28
|
+
DatasetRecord,
|
|
29
|
+
DatasetSchema,
|
|
30
|
+
FieldInfo,
|
|
31
|
+
Connection,
|
|
32
|
+
PageInfo,
|
|
33
|
+
Edge,
|
|
34
|
+
FilterInput,
|
|
35
|
+
RateLimitInfo,
|
|
36
|
+
// ... and more
|
|
37
|
+
} from '@carddb/core'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Errors
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import {
|
|
44
|
+
CardDBError,
|
|
45
|
+
AuthenticationError,
|
|
46
|
+
RateLimitError,
|
|
47
|
+
NotFoundError,
|
|
48
|
+
ValidationError,
|
|
49
|
+
RestrictedError,
|
|
50
|
+
GraphQLError,
|
|
51
|
+
ConnectionError,
|
|
52
|
+
TimeoutError,
|
|
53
|
+
ServerError,
|
|
54
|
+
} from '@carddb/core'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Operators
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import {
|
|
61
|
+
eq,
|
|
62
|
+
neq,
|
|
63
|
+
gt,
|
|
64
|
+
gte,
|
|
65
|
+
lt,
|
|
66
|
+
lte,
|
|
67
|
+
within,
|
|
68
|
+
notWithin,
|
|
69
|
+
contains,
|
|
70
|
+
like,
|
|
71
|
+
ilike,
|
|
72
|
+
isNull,
|
|
73
|
+
isNotNull,
|
|
74
|
+
} from '@carddb/core'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Classes
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { FilterBuilder, QueryBuilder, Collection } from '@carddb/core'
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
MIT
|