@magda/auth-api-client 2.3.3 → 3.0.0-alpha.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/dist/index.d.ts +6 -10
- package/dist/index.js +18606 -29260
- package/package.json +18 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
declare class ApiClient {
|
|
3
2
|
private jwt;
|
|
4
3
|
private requestInitOption;
|
|
@@ -159,7 +158,7 @@ declare interface Functor<T> {
|
|
|
159
158
|
|
|
160
159
|
export declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
161
160
|
private type;
|
|
162
|
-
private value
|
|
161
|
+
private value?;
|
|
163
162
|
constructor(type: MaybeType, value?: T);
|
|
164
163
|
static sequence<T>(t: {
|
|
165
164
|
[k: string]: Maybe<T>;
|
|
@@ -171,9 +170,11 @@ export declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
|
171
170
|
}) => Maybe<{
|
|
172
171
|
[k: string]: any;
|
|
173
172
|
}>;
|
|
174
|
-
static maybe<T>(t
|
|
173
|
+
static maybe<T>(t?: T | null): Maybe<T>;
|
|
175
174
|
static just<T>(t: T): Maybe<T>;
|
|
176
175
|
static nothing<T>(): Maybe<T>;
|
|
176
|
+
static isJust<T>(t: Maybe<T>): boolean;
|
|
177
|
+
static isNothing<T>(t: Maybe<T>): boolean;
|
|
177
178
|
unit<U>(u: U): Maybe<U>;
|
|
178
179
|
bind<U>(f: (t: T) => Maybe<U>): Maybe<U>;
|
|
179
180
|
of: <U>(u: U) => Maybe<U>;
|
|
@@ -187,7 +188,7 @@ export declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
|
187
188
|
valueOr<U extends T>(defaultValue: U): T | U;
|
|
188
189
|
valueOrCompute<U extends T>(defaultValueFunction: () => U): T | U;
|
|
189
190
|
valueOrThrow(error?: Error): T;
|
|
190
|
-
do(patterns?:
|
|
191
|
+
do(patterns?: Partial<MaybePatterns<T, void>>): Maybe<T>;
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
declare interface MaybePatterns<T, U> {
|
|
@@ -197,7 +198,7 @@ declare interface MaybePatterns<T, U> {
|
|
|
197
198
|
|
|
198
199
|
declare enum MaybeType {
|
|
199
200
|
Nothing = 0,
|
|
200
|
-
Just = 1
|
|
201
|
+
Just = 1
|
|
201
202
|
}
|
|
202
203
|
|
|
203
204
|
declare interface Monad<T> {
|
|
@@ -222,11 +223,6 @@ declare type OperationRecord = {
|
|
|
222
223
|
resource_id: string;
|
|
223
224
|
};
|
|
224
225
|
|
|
225
|
-
declare interface OptionalMaybePatterns<T, U> {
|
|
226
|
-
just?: (t: T) => U;
|
|
227
|
-
nothing?: () => U;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
226
|
export declare type OrgUnit = Partial<OrgUnitRecord> & {
|
|
231
227
|
relationship?: OrgUnitRelationshipType;
|
|
232
228
|
};
|