@opexa/portal-sdk 0.59.145 → 0.59.146

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.
Files changed (39) hide show
  1. package/README.md +1762 -1762
  2. package/dist/{chunk-BTV72WJH.js → chunk-77N5VUZS.js} +2 -2
  3. package/dist/chunk-77N5VUZS.js.map +1 -0
  4. package/dist/{chunk-7Y7FWND5.js → chunk-ZBLHFIBW.js} +3 -3
  5. package/dist/chunk-ZBLHFIBW.js.map +1 -0
  6. package/dist/{chunk-ITHR4H7D.js → chunk-ZTPPUUY7.js} +3 -3
  7. package/dist/chunk-ZTPPUUY7.js.map +1 -0
  8. package/dist/graphql-client-B_tCbUDO.d.cts +30 -0
  9. package/dist/graphql-client-CjJ2PWjG.d.ts +30 -0
  10. package/dist/index-L0Y9nBAa.d.cts +55 -0
  11. package/dist/index-L0Y9nBAa.d.ts +55 -0
  12. package/dist/index.cjs +103 -2
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +17 -5
  15. package/dist/index.d.ts +17 -5
  16. package/dist/index.js +105 -5
  17. package/dist/index.js.map +1 -1
  18. package/dist/services/index.cjs.map +1 -1
  19. package/dist/services/index.d.cts +4 -3
  20. package/dist/services/index.d.ts +4 -3
  21. package/dist/services/index.js +2 -2
  22. package/dist/types/index.cjs +4 -0
  23. package/dist/types/index.cjs.map +1 -0
  24. package/dist/types/index.d.cts +1 -0
  25. package/dist/types/index.d.ts +1 -0
  26. package/dist/types/index.js +3 -0
  27. package/dist/types/index.js.map +1 -0
  28. package/dist/{types-CTtgnovB.d.cts → types-CxYSPGJU.d.ts} +1 -1
  29. package/dist/{types-m4mQIRGr.d.ts → types-ss9ZrvFO.d.cts} +1 -1
  30. package/dist/utils/index.cjs.map +1 -1
  31. package/dist/utils/index.d.cts +2 -1
  32. package/dist/utils/index.d.ts +2 -1
  33. package/dist/utils/index.js +2 -2
  34. package/package.json +1 -1
  35. package/dist/chunk-7Y7FWND5.js.map +0 -1
  36. package/dist/chunk-BTV72WJH.js.map +0 -1
  37. package/dist/chunk-ITHR4H7D.js.map +0 -1
  38. package/dist/graphql-client-Cr5nXEyQ.d.cts +0 -58
  39. package/dist/graphql-client-Cr5nXEyQ.d.ts +0 -58
@@ -1,58 +0,0 @@
1
- type GenericObject = Record<string, any>;
2
- type Assign<Target, Source> = Omit<Target, keyof Source> & Source;
3
- type Alias<T> = T & {
4
- _?: never;
5
- };
6
- type HttpError = /* 400 */ 'HttpBadRequest' | /* 401 */ 'HttpUnauthorized' | /* 403 */ 'HttpForbidden' | /* 404 */ 'HttpNotFound' | /* 408 */ 'HttpRequestTimeout' | /* 429 */ 'HttpTooManyRequests' | /* 500 */ 'HttpInternalServerError';
7
- type OperationError<T extends string = string> = {
8
- name: T;
9
- message: string;
10
- };
11
- type OperationResult<Error extends string = never, Data = never> = [
12
- Data
13
- ] extends [never] ? {
14
- ok: false;
15
- data?: never;
16
- error: [Error] extends [never] ? OperationError<HttpError | 'UnknownError'> : OperationError<Error> | OperationError<HttpError | 'UnknownError'>;
17
- } | {
18
- ok: true;
19
- data?: never;
20
- error?: never;
21
- } : {
22
- ok: false;
23
- data?: never;
24
- error: [Error] extends [never] ? OperationError<HttpError | 'UnknownError'> : OperationError<Error> | OperationError<HttpError | 'UnknownError'>;
25
- } | {
26
- ok: true;
27
- data: Data;
28
- error?: never;
29
- };
30
-
31
- type ModifiableKey = 'mode' | 'cache' | 'signal' | 'headers' | 'integrity' | 'keepalive' | 'credentials';
32
- type Modifiable = {
33
- [K in ModifiableKey]: Request[K];
34
- };
35
- interface ModifiedRequest extends Readonly<Omit<Request, ModifiableKey>>, Modifiable {
36
- }
37
- type GraphQLClientMiddleware = (request: ModifiedRequest) => ModifiedRequest | Promise<ModifiedRequest>;
38
- interface GraphQLClientFetchOptions extends Omit<RequestInit, 'body'> {
39
- }
40
- interface GraphQLClientConfig {
41
- fetch?: typeof globalThis.fetch | null;
42
- fetchOptions?: GraphQLClientFetchOptions;
43
- middlewares?: GraphQLClientMiddleware[];
44
- }
45
- type Getter<T> = () => T;
46
- declare class GraphQLClient {
47
- private url;
48
- private config;
49
- constructor(url: string, config?: Getter<GraphQLClientConfig> | GraphQLClientConfig);
50
- request<Data, Variables extends GenericObject = GenericObject>(query: string, variables?: Variables, userOptions?: GraphQLClientFetchOptions): Promise<OperationResult<never, Data>>;
51
- /** Single file upload */
52
- upload<Data, Variables extends GenericObject = GenericObject>(query: string, variables: Variables, options?: GraphQLClientFetchOptions): Promise<OperationResult<never, Data>>;
53
- private exec;
54
- private runMiddlewares;
55
- private createUploadBody;
56
- }
57
-
58
- export { type Assign as A, type GraphQLClientMiddleware as G, type HttpError as H, type ModifiedRequest as M, type OperationError as O, type OperationResult as a, GraphQLClient as b, type Alias as c, type GraphQLClientFetchOptions as d, type GraphQLClientConfig as e };
@@ -1,58 +0,0 @@
1
- type GenericObject = Record<string, any>;
2
- type Assign<Target, Source> = Omit<Target, keyof Source> & Source;
3
- type Alias<T> = T & {
4
- _?: never;
5
- };
6
- type HttpError = /* 400 */ 'HttpBadRequest' | /* 401 */ 'HttpUnauthorized' | /* 403 */ 'HttpForbidden' | /* 404 */ 'HttpNotFound' | /* 408 */ 'HttpRequestTimeout' | /* 429 */ 'HttpTooManyRequests' | /* 500 */ 'HttpInternalServerError';
7
- type OperationError<T extends string = string> = {
8
- name: T;
9
- message: string;
10
- };
11
- type OperationResult<Error extends string = never, Data = never> = [
12
- Data
13
- ] extends [never] ? {
14
- ok: false;
15
- data?: never;
16
- error: [Error] extends [never] ? OperationError<HttpError | 'UnknownError'> : OperationError<Error> | OperationError<HttpError | 'UnknownError'>;
17
- } | {
18
- ok: true;
19
- data?: never;
20
- error?: never;
21
- } : {
22
- ok: false;
23
- data?: never;
24
- error: [Error] extends [never] ? OperationError<HttpError | 'UnknownError'> : OperationError<Error> | OperationError<HttpError | 'UnknownError'>;
25
- } | {
26
- ok: true;
27
- data: Data;
28
- error?: never;
29
- };
30
-
31
- type ModifiableKey = 'mode' | 'cache' | 'signal' | 'headers' | 'integrity' | 'keepalive' | 'credentials';
32
- type Modifiable = {
33
- [K in ModifiableKey]: Request[K];
34
- };
35
- interface ModifiedRequest extends Readonly<Omit<Request, ModifiableKey>>, Modifiable {
36
- }
37
- type GraphQLClientMiddleware = (request: ModifiedRequest) => ModifiedRequest | Promise<ModifiedRequest>;
38
- interface GraphQLClientFetchOptions extends Omit<RequestInit, 'body'> {
39
- }
40
- interface GraphQLClientConfig {
41
- fetch?: typeof globalThis.fetch | null;
42
- fetchOptions?: GraphQLClientFetchOptions;
43
- middlewares?: GraphQLClientMiddleware[];
44
- }
45
- type Getter<T> = () => T;
46
- declare class GraphQLClient {
47
- private url;
48
- private config;
49
- constructor(url: string, config?: Getter<GraphQLClientConfig> | GraphQLClientConfig);
50
- request<Data, Variables extends GenericObject = GenericObject>(query: string, variables?: Variables, userOptions?: GraphQLClientFetchOptions): Promise<OperationResult<never, Data>>;
51
- /** Single file upload */
52
- upload<Data, Variables extends GenericObject = GenericObject>(query: string, variables: Variables, options?: GraphQLClientFetchOptions): Promise<OperationResult<never, Data>>;
53
- private exec;
54
- private runMiddlewares;
55
- private createUploadBody;
56
- }
57
-
58
- export { type Assign as A, type GraphQLClientMiddleware as G, type HttpError as H, type ModifiedRequest as M, type OperationError as O, type OperationResult as a, GraphQLClient as b, type Alias as c, type GraphQLClientFetchOptions as d, type GraphQLClientConfig as e };