@shipstatic/types 2.21.1 → 2.21.2
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 +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ npm install @shipstatic/types
|
|
|
16
16
|
|
|
17
17
|
## What's included
|
|
18
18
|
|
|
19
|
-
### Core
|
|
19
|
+
### Core entities
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
import type {
|
|
@@ -38,7 +38,7 @@ survives, otherwise the `*DeleteResponse` shape: the resource noun carrying
|
|
|
38
38
|
the canonical key, plus the resource's own state field where the resource is
|
|
39
39
|
mid-transition. No `message`, no `success`, no constant flags.
|
|
40
40
|
|
|
41
|
-
### Error
|
|
41
|
+
### Error system
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
44
|
import { ShipError, ErrorType, isShipError } from '@shipstatic/types';
|
|
@@ -84,7 +84,7 @@ catch (cause) { throw ShipError.fromFetchError(cause, 'Get account'); }
|
|
|
84
84
|
|
|
85
85
|
Both helpers accept an optional operation-name string for contextual messages (`"Get account was cancelled"`, `"Get account failed: ..."`).
|
|
86
86
|
|
|
87
|
-
### Status
|
|
87
|
+
### Status constants
|
|
88
88
|
|
|
89
89
|
```typescript
|
|
90
90
|
import {
|
|
@@ -109,7 +109,7 @@ import type {
|
|
|
109
109
|
} from '@shipstatic/types';
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
### Resource
|
|
112
|
+
### Resource contracts
|
|
113
113
|
|
|
114
114
|
SDK interface definitions:
|
|
115
115
|
|
|
@@ -122,7 +122,7 @@ import type {
|
|
|
122
122
|
} from '@shipstatic/types';
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
### Validation
|
|
125
|
+
### Validation utilities
|
|
126
126
|
|
|
127
127
|
```typescript
|
|
128
128
|
import {
|
|
@@ -146,7 +146,7 @@ const limits = await ship.getLimits();
|
|
|
146
146
|
isBlockedExtension('virus.exe', limits.blockedExtensions ?? []);
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
### File
|
|
149
|
+
### File upload types
|
|
150
150
|
|
|
151
151
|
```typescript
|
|
152
152
|
import type {
|
|
@@ -157,7 +157,7 @@ import type {
|
|
|
157
157
|
} from '@shipstatic/types';
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
### Domain
|
|
160
|
+
### Domain utilities
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
163
|
import {
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
} from '@shipstatic/types';
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
### Label
|
|
172
|
+
### Label utilities
|
|
173
173
|
|
|
174
174
|
```typescript
|
|
175
175
|
import {
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
} from '@shipstatic/types';
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
-
### Password
|
|
183
|
+
### Password utilities
|
|
184
184
|
|
|
185
185
|
```typescript
|
|
186
186
|
import {
|