@aarthiklabs/credit-sdk 0.0.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/README.md +73 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/core/errors/errors.d.ts +49 -0
- package/dist/core/errors/index.d.ts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/utilities/index.d.ts +1 -0
- package/dist/core/utilities/utilities.d.ts +26 -0
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.d.cts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/types/ONDC/FIS12/common/ack.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/action.d.ts +1 -0
- package/dist/types/ONDC/FIS12/common/add-on.d.ts +12 -0
- package/dist/types/ONDC/FIS12/common/address.d.ts +2 -0
- package/dist/types/ONDC/FIS12/common/agent.d.ts +11 -0
- package/dist/types/ONDC/FIS12/common/authorization.d.ts +7 -0
- package/dist/types/ONDC/FIS12/common/billing.d.ts +16 -0
- package/dist/types/ONDC/FIS12/common/breakup.d.ts +9 -0
- package/dist/types/ONDC/FIS12/common/cancellation-terms.d.ts +14 -0
- package/dist/types/ONDC/FIS12/common/cancellation.d.ts +11 -0
- package/dist/types/ONDC/FIS12/common/catalog.d.ts +16 -0
- package/dist/types/ONDC/FIS12/common/category.d.ts +12 -0
- package/dist/types/ONDC/FIS12/common/city.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/contact.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/context.d.ts +18 -0
- package/dist/types/ONDC/FIS12/common/country.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/credential.d.ts +6 -0
- package/dist/types/ONDC/FIS12/common/customer.d.ts +9 -0
- package/dist/types/ONDC/FIS12/common/decimal-value.d.ts +1 -0
- package/dist/types/ONDC/FIS12/common/descriptor.d.ts +14 -0
- package/dist/types/ONDC/FIS12/common/domain.d.ts +6 -0
- package/dist/types/ONDC/FIS12/common/duration.d.ts +1 -0
- package/dist/types/ONDC/FIS12/common/error.d.ts +6 -0
- package/dist/types/ONDC/FIS12/common/fee.d.ts +6 -0
- package/dist/types/ONDC/FIS12/common/form.d.ts +8 -0
- package/dist/types/ONDC/FIS12/common/fulfillment-state.d.ts +6 -0
- package/dist/types/ONDC/FIS12/common/fulfillment.d.ts +38 -0
- package/dist/types/ONDC/FIS12/common/image.d.ts +7 -0
- package/dist/types/ONDC/FIS12/common/index.d.ts +59 -0
- package/dist/types/ONDC/FIS12/common/instructions.d.ts +14 -0
- package/dist/types/ONDC/FIS12/common/intent.d.ts +19 -0
- package/dist/types/ONDC/FIS12/common/item-quantity.d.ts +28 -0
- package/dist/types/ONDC/FIS12/common/item.d.ts +61 -0
- package/dist/types/ONDC/FIS12/common/location.d.ts +23 -0
- package/dist/types/ONDC/FIS12/common/media-file.d.ts +7 -0
- package/dist/types/ONDC/FIS12/common/message.d.ts +55 -0
- package/dist/types/ONDC/FIS12/common/offer.d.ts +16 -0
- package/dist/types/ONDC/FIS12/common/option.d.ts +6 -0
- package/dist/types/ONDC/FIS12/common/order.d.ts +44 -0
- package/dist/types/ONDC/FIS12/common/organization.d.ts +14 -0
- package/dist/types/ONDC/FIS12/common/payload.d.ts +8 -0
- package/dist/types/ONDC/FIS12/common/payment.d.ts +25 -0
- package/dist/types/ONDC/FIS12/common/person.d.ts +22 -0
- package/dist/types/ONDC/FIS12/common/price.d.ts +12 -0
- package/dist/types/ONDC/FIS12/common/provider.d.ts +28 -0
- package/dist/types/ONDC/FIS12/common/quote.d.ts +8 -0
- package/dist/types/ONDC/FIS12/common/rating.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/replacement-term.d.ts +9 -0
- package/dist/types/ONDC/FIS12/common/return-term.d.ts +11 -0
- package/dist/types/ONDC/FIS12/common/scalar.d.ts +13 -0
- package/dist/types/ONDC/FIS12/common/schedule.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/state.d.ts +5 -0
- package/dist/types/ONDC/FIS12/common/support.d.ts +8 -0
- package/dist/types/ONDC/FIS12/common/tag-group.d.ts +8 -0
- package/dist/types/ONDC/FIS12/common/tag.d.ts +7 -0
- package/dist/types/ONDC/FIS12/common/time.d.ts +13 -0
- package/dist/types/ONDC/FIS12/common/tracking.d.ts +7 -0
- package/dist/types/ONDC/FIS12/common/vehicle.d.ts +16 -0
- package/dist/types/ONDC/FIS12/common/xinput.d.ts +22 -0
- package/dist/types/ONDC/FIS12/index.d.ts +2 -0
- package/dist/types/ONDC/index.d.ts +3 -0
- package/dist/types/ONDC/response.d.ts +8 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +1 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
+
|
|
14
|
+
## Expanding the ESLint configuration
|
|
15
|
+
|
|
16
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
export default defineConfig([
|
|
20
|
+
globalIgnores(['dist']),
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.{ts,tsx}'],
|
|
23
|
+
extends: [
|
|
24
|
+
// Other configs...
|
|
25
|
+
|
|
26
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
+
tseslint.configs.recommendedTypeChecked,
|
|
28
|
+
// Alternatively, use this for stricter rules
|
|
29
|
+
tseslint.configs.strictTypeChecked,
|
|
30
|
+
// Optionally, add this for stylistic rules
|
|
31
|
+
tseslint.configs.stylisticTypeChecked,
|
|
32
|
+
|
|
33
|
+
// Other configs...
|
|
34
|
+
],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
parserOptions: {
|
|
37
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
+
tsconfigRootDir: import.meta.dirname,
|
|
39
|
+
},
|
|
40
|
+
// other options...
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
])
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
// eslint.config.js
|
|
50
|
+
import reactX from 'eslint-plugin-react-x'
|
|
51
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
52
|
+
|
|
53
|
+
export default defineConfig([
|
|
54
|
+
globalIgnores(['dist']),
|
|
55
|
+
{
|
|
56
|
+
files: ['**/*.{ts,tsx}'],
|
|
57
|
+
extends: [
|
|
58
|
+
// Other configs...
|
|
59
|
+
// Enable lint rules for React
|
|
60
|
+
reactX.configs['recommended-typescript'],
|
|
61
|
+
// Enable lint rules for React DOM
|
|
62
|
+
reactDom.configs.recommended,
|
|
63
|
+
],
|
|
64
|
+
languageOptions: {
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
+
tsconfigRootDir: import.meta.dirname,
|
|
68
|
+
},
|
|
69
|
+
// other options...
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
])
|
|
73
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type TypeOfErrorCode = "CONFIG_ERROR" | "NETWORK_ERROR" | "TIMEOUT" | "ABORTED" | "HTTP_ERROR" | "PARSE_ERROR" | "UNKNOWN_ERROR";
|
|
2
|
+
export type TypeOfErrorMeta = Readonly<Record<string, unknown>>;
|
|
3
|
+
/**
|
|
4
|
+
* Base error type for the SDK.
|
|
5
|
+
* - Always has a stable `code`
|
|
6
|
+
* - May include structured `meta`
|
|
7
|
+
* - Uses standard `cause` when available
|
|
8
|
+
*/
|
|
9
|
+
export declare class AarthikError extends Error {
|
|
10
|
+
readonly code: TypeOfErrorCode;
|
|
11
|
+
readonly meta?: TypeOfErrorMeta;
|
|
12
|
+
constructor(code: TypeOfErrorCode, message: string, options?: {
|
|
13
|
+
cause?: unknown;
|
|
14
|
+
meta?: TypeOfErrorMeta;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export declare class AarthikConfigurationError extends AarthikError {
|
|
18
|
+
constructor(message: string, meta?: TypeOfErrorMeta);
|
|
19
|
+
}
|
|
20
|
+
export declare class AarthikNetworkError extends AarthikError {
|
|
21
|
+
constructor(message: string, cause?: unknown, meta?: TypeOfErrorMeta);
|
|
22
|
+
}
|
|
23
|
+
export declare class AarthikTimeOutError extends AarthikError {
|
|
24
|
+
constructor(timeoutMs: number, meta?: TypeOfErrorMeta);
|
|
25
|
+
}
|
|
26
|
+
export declare class AarthikAbortedError extends AarthikError {
|
|
27
|
+
constructor(message?: string, cause?: unknown, meta?: TypeOfErrorMeta);
|
|
28
|
+
}
|
|
29
|
+
export declare class AarthikParseError extends AarthikError {
|
|
30
|
+
constructor(message: string, cause?: unknown, meta?: TypeOfErrorMeta);
|
|
31
|
+
}
|
|
32
|
+
export declare class AarthikHTTPError extends AarthikError {
|
|
33
|
+
readonly status: number;
|
|
34
|
+
readonly statusText: string;
|
|
35
|
+
readonly URL: string;
|
|
36
|
+
readonly method: string;
|
|
37
|
+
readonly responseBody?: unknown;
|
|
38
|
+
constructor(input: {
|
|
39
|
+
status: number;
|
|
40
|
+
statusText: string;
|
|
41
|
+
URL: string;
|
|
42
|
+
method: string;
|
|
43
|
+
responseBody?: unknown;
|
|
44
|
+
meta?: TypeOfErrorMeta;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/** Best-effort check for AbortError thrown by fetch implementations. */
|
|
48
|
+
export declare function isAarthikAbortedError(error: unknown): boolean;
|
|
49
|
+
export declare function toAarthikError(error: unknown): AarthikError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./errors";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type TypeOfAwaitable<Type> = Type | Promise<Type>;
|
|
2
|
+
export type TypeOfHeaderValue = string | number | boolean | null | undefined;
|
|
3
|
+
export type TypeofHeaderRecord = Record<string, TypeOfHeaderValue>;
|
|
4
|
+
export declare function assert(condition: unknown, message: string): asserts condition;
|
|
5
|
+
/**
|
|
6
|
+
* Minimal random ID with strong preference for crypto.randomUUID().
|
|
7
|
+
* Works in modern browsers and Node 18+.
|
|
8
|
+
*/
|
|
9
|
+
export declare function randomID(): string;
|
|
10
|
+
export declare function normalizeHeaderRecord(input?: TypeofHeaderRecord): TypeofHeaderRecord;
|
|
11
|
+
export declare function mergeHeaders(...sources: Array<HeadersInit | TypeofHeaderRecord | undefined>): Headers;
|
|
12
|
+
export type TypeOfQueryValue = string | number | boolean | null | undefined;
|
|
13
|
+
export type TypeOfQueryParameters = Record<string, TypeOfQueryValue | TypeOfQueryValue[]>;
|
|
14
|
+
export declare function toSearchParameters(query?: TypeOfQueryParameters): URLSearchParams;
|
|
15
|
+
export declare function joinURL(baseURL: string, path: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Sleep that can be aborted.
|
|
18
|
+
*/
|
|
19
|
+
export declare function sleep(ms: number, signal?: AbortSignal): Promise<void>;
|
|
20
|
+
export declare function backoffDelayMs(parameters: {
|
|
21
|
+
attempt: number;
|
|
22
|
+
baseDelayMs: number;
|
|
23
|
+
maxDelayMs: number;
|
|
24
|
+
jitter: boolean;
|
|
25
|
+
}): number;
|
|
26
|
+
export declare function isJSONContentType(contentType: string | null): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TypeOfAction = "search" | "on_search" | "select" | "on_select" | "init" | "on_init" | "confirm" | "on_confirm" | "update" | "on_update" | "status" | "on_status" | "support" | "on_support";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TypeOfDescriptor } from "./descriptor";
|
|
2
|
+
import type { TypeOfItemQuantity } from "./item-quantity";
|
|
3
|
+
import type { TypeOfPrice } from "./price";
|
|
4
|
+
import type { TypeOfTagGroups } from "./tag-group";
|
|
5
|
+
export type TypeOfAddOn = {
|
|
6
|
+
id?: string;
|
|
7
|
+
descriptor?: TypeOfDescriptor;
|
|
8
|
+
price?: TypeOfPrice;
|
|
9
|
+
quantity?: TypeOfItemQuantity;
|
|
10
|
+
tags?: TypeOfTagGroups;
|
|
11
|
+
};
|
|
12
|
+
export type TypeOfAddOns = TypeOfAddOn[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TypeOfContact } from "./contact";
|
|
2
|
+
import type { TypeOfOrganization } from "./organization";
|
|
3
|
+
import type { TypeOfPerson } from "./person";
|
|
4
|
+
import type { TypeOfRating } from "./rating";
|
|
5
|
+
export type TypeOfAgent = {
|
|
6
|
+
person?: TypeOfPerson;
|
|
7
|
+
contact?: TypeOfContact;
|
|
8
|
+
organization?: TypeOfOrganization;
|
|
9
|
+
rating?: TypeOfRating["value"];
|
|
10
|
+
};
|
|
11
|
+
export type TypeOfAgents = TypeOfAgent[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TypeOfCity } from "./city";
|
|
2
|
+
import type { TypeOfOrganization } from "./organization";
|
|
3
|
+
import type { TypeOfState } from "./state";
|
|
4
|
+
import type { TypeOfTime } from "./time";
|
|
5
|
+
export type TypeOfBilling = {
|
|
6
|
+
name?: string;
|
|
7
|
+
organization?: TypeOfOrganization;
|
|
8
|
+
address?: string;
|
|
9
|
+
state?: TypeOfState;
|
|
10
|
+
city?: TypeOfCity;
|
|
11
|
+
email?: string;
|
|
12
|
+
phone?: string;
|
|
13
|
+
time?: TypeOfTime;
|
|
14
|
+
tax_id?: string;
|
|
15
|
+
};
|
|
16
|
+
export type TypeOfBillings = TypeOfBilling[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TypeOfFee } from "./fee";
|
|
2
|
+
import type { TypeOfFulfillmentState } from "./fulfillment-state";
|
|
3
|
+
import type { TypeOfMediaFile } from "./media-file";
|
|
4
|
+
import type { TypeOfTime } from "./time";
|
|
5
|
+
import type { TypeOfXInput } from "./xinput";
|
|
6
|
+
export type TypeOfCancellationTerm = {
|
|
7
|
+
fulfillment_state?: TypeOfFulfillmentState;
|
|
8
|
+
reason_required?: boolean;
|
|
9
|
+
cancel_by?: TypeOfTime;
|
|
10
|
+
cancellation_fee?: TypeOfFee;
|
|
11
|
+
xinput?: TypeOfXInput;
|
|
12
|
+
external_ref?: TypeOfMediaFile;
|
|
13
|
+
};
|
|
14
|
+
export type TypeOfCancellationTerms = TypeOfCancellationTerm[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TypeOfDescriptor } from "./descriptor";
|
|
2
|
+
export type TypeOfCancellation = {
|
|
3
|
+
time?: string;
|
|
4
|
+
cancelled_by?: "CONSUMER" | "PROVIDER";
|
|
5
|
+
reason?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
descriptor?: TypeOfDescriptor;
|
|
8
|
+
};
|
|
9
|
+
additional_description?: TypeOfDescriptor;
|
|
10
|
+
};
|
|
11
|
+
export type TypeOfCancellations = TypeOfCancellation[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TypeOfDescriptor } from "./descriptor";
|
|
2
|
+
import type { TypeOfFulfillments } from "./fulfillment";
|
|
3
|
+
import type { TypeOfOffers } from "./offer";
|
|
4
|
+
import type { TypeOfPayments } from "./payment";
|
|
5
|
+
import type { TypeOfProviders } from "./provider";
|
|
6
|
+
import type { TypeOfTagGroups } from "./tag-group";
|
|
7
|
+
export type TypeOfCatalog = {
|
|
8
|
+
descriptor?: TypeOfDescriptor;
|
|
9
|
+
fulfillments?: TypeOfFulfillments;
|
|
10
|
+
payments?: TypeOfPayments;
|
|
11
|
+
offers?: TypeOfOffers;
|
|
12
|
+
providers?: TypeOfProviders;
|
|
13
|
+
exp?: string;
|
|
14
|
+
ttl?: string;
|
|
15
|
+
tags?: TypeOfTagGroups;
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TypeOfDescriptor } from "./descriptor";
|
|
2
|
+
import type { TypeOfTagGroups } from "./tag-group";
|
|
3
|
+
import type { TypeOfTime } from "./time";
|
|
4
|
+
export type TypeOfCategory = {
|
|
5
|
+
id?: string;
|
|
6
|
+
parent_category_id?: string;
|
|
7
|
+
descriptor?: TypeOfDescriptor;
|
|
8
|
+
time?: TypeOfTime;
|
|
9
|
+
ttl?: string;
|
|
10
|
+
tags?: TypeOfTagGroups;
|
|
11
|
+
};
|
|
12
|
+
export type TypeOfCategories = TypeOfCategory[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TypeOfAction } from "./action";
|
|
2
|
+
import type { TypeOfDomain } from "./domain";
|
|
3
|
+
import type { TypeOfLocation } from "./location";
|
|
4
|
+
export type TypeOfContext = {
|
|
5
|
+
domain?: TypeOfDomain["code"];
|
|
6
|
+
location?: TypeOfLocation;
|
|
7
|
+
action?: TypeOfAction;
|
|
8
|
+
version?: "2.0.0" | "2.0.1";
|
|
9
|
+
bap_id?: string;
|
|
10
|
+
bap_uri?: string;
|
|
11
|
+
bpp_id?: string;
|
|
12
|
+
bpp_uri?: string;
|
|
13
|
+
transaction_id?: string;
|
|
14
|
+
message_id?: string;
|
|
15
|
+
timestamp?: string;
|
|
16
|
+
key?: string;
|
|
17
|
+
ttl?: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TypeOfContact } from "./contact";
|
|
2
|
+
import type { TypeOfOrganization } from "./organization";
|
|
3
|
+
import type { TypeOfPerson } from "./person";
|
|
4
|
+
export type TypeOfCustomer = {
|
|
5
|
+
organization?: TypeOfOrganization;
|
|
6
|
+
person?: TypeOfPerson;
|
|
7
|
+
contact?: TypeOfContact;
|
|
8
|
+
};
|
|
9
|
+
export type TypeOfCustomers = TypeOfCustomer[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TypeOfDecimalValue = string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TypeOfImages } from "./image";
|
|
2
|
+
import type { TypeOfMediaFiles } from "./media-file";
|
|
3
|
+
export type TypeOfDescriptor = {
|
|
4
|
+
name?: string;
|
|
5
|
+
code?: string;
|
|
6
|
+
short_desc?: string;
|
|
7
|
+
long_desc?: string;
|
|
8
|
+
additional_desc?: {
|
|
9
|
+
url?: string;
|
|
10
|
+
content_type?: "text/plain" | "text/html" | "application/json";
|
|
11
|
+
};
|
|
12
|
+
media?: TypeOfMediaFiles;
|
|
13
|
+
images?: TypeOfImages;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TypeOfDuration = string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TypeOfAgent } from "./agent";
|
|
2
|
+
import type { TypeOfAuthorization } from "./authorization";
|
|
3
|
+
import type { TypeOfContact } from "./contact";
|
|
4
|
+
import type { TypeOfCustomer } from "./customer";
|
|
5
|
+
import type { TypeOfFulfillmentState } from "./fulfillment-state";
|
|
6
|
+
import type { TypeOfInstructions } from "./instructions";
|
|
7
|
+
import type { TypeOfLocation } from "./location";
|
|
8
|
+
import type { TypeOfPerson } from "./person";
|
|
9
|
+
import type { TypeOfRating } from "./rating";
|
|
10
|
+
import type { TypeOfTagGroups } from "./tag-group";
|
|
11
|
+
import type { TypeOfTime } from "./time";
|
|
12
|
+
import type { TypeOfVehicle } from "./vehicle";
|
|
13
|
+
export type TypeOfFulfillment = {
|
|
14
|
+
id?: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
rateable?: boolean;
|
|
17
|
+
rating?: TypeOfRating["value"];
|
|
18
|
+
state?: TypeOfFulfillmentState;
|
|
19
|
+
tracking?: boolean;
|
|
20
|
+
customer?: TypeOfCustomer;
|
|
21
|
+
agent?: TypeOfAgent;
|
|
22
|
+
contact?: TypeOfContact;
|
|
23
|
+
vehicle?: TypeOfVehicle;
|
|
24
|
+
stops?: {
|
|
25
|
+
id?: string;
|
|
26
|
+
parent_stop_id?: string;
|
|
27
|
+
location?: TypeOfLocation;
|
|
28
|
+
type?: string;
|
|
29
|
+
time?: TypeOfTime;
|
|
30
|
+
instructions?: TypeOfInstructions;
|
|
31
|
+
contact?: TypeOfContact;
|
|
32
|
+
person?: TypeOfPerson;
|
|
33
|
+
authorization?: TypeOfAuthorization;
|
|
34
|
+
}[];
|
|
35
|
+
path?: string;
|
|
36
|
+
tags?: TypeOfTagGroups;
|
|
37
|
+
};
|
|
38
|
+
export type TypeOfFulfillments = TypeOfFulfillment[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { TypeOfAck } from "./ack";
|
|
2
|
+
import type { TypeOfAction } from "./action";
|
|
3
|
+
import type { TypeOfAddOn, TypeOfAddOns } from "./add-on";
|
|
4
|
+
import type { TypeOfAddress, TypeOfAddresses } from "./address";
|
|
5
|
+
import type { TypeOfAgent, TypeOfAgents } from "./agent";
|
|
6
|
+
import type { TypeOfAuthorization } from "./authorization";
|
|
7
|
+
import type { TypeOfBilling, TypeOfBillings } from "./billing";
|
|
8
|
+
import type { TypeOfBreakUp } from "./breakup";
|
|
9
|
+
import type { TypeOfCancellation, TypeOfCancellations } from "./cancellation";
|
|
10
|
+
import type { TypeOfCancellationTerm, TypeOfCancellationTerms } from "./cancellation-terms";
|
|
11
|
+
import type { TypeOfCatalog } from "./catalog";
|
|
12
|
+
import type { TypeOfCategories, TypeOfCategory } from "./category";
|
|
13
|
+
import type { TypeOfCities, TypeOfCity } from "./city";
|
|
14
|
+
import type { TypeOfContact } from "./contact";
|
|
15
|
+
import type { TypeOfContext } from "./context";
|
|
16
|
+
import type { TypeOfCountries, TypeOfCountry } from "./country";
|
|
17
|
+
import type { TypeOfCredential, TypeOfCredentials } from "./credential";
|
|
18
|
+
import type { TypeOfCustomer, TypeOfCustomers } from "./customer";
|
|
19
|
+
import type { TypeOfDecimalValue } from "./decimal-value";
|
|
20
|
+
import type { TypeOfDescriptor } from "./descriptor";
|
|
21
|
+
import type { TypeOfDomain } from "./domain";
|
|
22
|
+
import type { TypeOfDuration } from "./duration";
|
|
23
|
+
import type { TypeOfError, TypeOfErrors } from "./error";
|
|
24
|
+
import type { TypeOfFee, TypeOfFees } from "./fee";
|
|
25
|
+
import type { TypeOfForm } from "./form";
|
|
26
|
+
import type { TypeOfFulfillment, TypeOfFulfillments } from "./fulfillment";
|
|
27
|
+
import type { TypeOfFulfillmentState } from "./fulfillment-state";
|
|
28
|
+
import type { TypeOfImage, TypeOfImages } from "./image";
|
|
29
|
+
import type { TypeOfInstructions } from "./instructions";
|
|
30
|
+
import type { TypeOfIntent, TypeOfIntents } from "./intent";
|
|
31
|
+
import type { TypeOfItem, TypeOfItems } from "./item";
|
|
32
|
+
import type { TypeOfItemQuantities, TypeOfItemQuantity } from "./item-quantity";
|
|
33
|
+
import type { TypeOfLocation, TypeOfLocations } from "./location";
|
|
34
|
+
import type { TypeOfMediaFile, TypeOfMediaFiles } from "./media-file";
|
|
35
|
+
import type { TypeOfMessage } from "./message";
|
|
36
|
+
import type { TypeOfOffer, TypeOfOffers } from "./offer";
|
|
37
|
+
import type { TypeOfOption, TypeOfOptions } from "./option";
|
|
38
|
+
import type { TypeOfOrder } from "./order";
|
|
39
|
+
import type { TypeOfOrganization } from "./organization";
|
|
40
|
+
import type { TypeOfPayload } from "./payload";
|
|
41
|
+
import type { TypeOfPayment, TypeOfPayments } from "./payment";
|
|
42
|
+
import type { TypeOfPerson } from "./person";
|
|
43
|
+
import type { TypeOfPrice, TypeOfPrices } from "./price";
|
|
44
|
+
import type { TypeOfProvider, TypeOfProviders } from "./provider";
|
|
45
|
+
import type { TypeOfQuote } from "./quote";
|
|
46
|
+
import type { TypeOfRating } from "./rating";
|
|
47
|
+
import type { TypeOfReplacementTerm, TypeOfReplacementTerms } from "./replacement-term";
|
|
48
|
+
import type { TypeOfReturnTerm, TypeOfReturnTerms } from "./return-term";
|
|
49
|
+
import type { TypeOfScalar, TypeOfScalars } from "./scalar";
|
|
50
|
+
import type { TypeOfSchedule } from "./schedule";
|
|
51
|
+
import type { TypeOfState, TypeOfStates } from "./state";
|
|
52
|
+
import type { TypeOfSupport } from "./support";
|
|
53
|
+
import type { TypeOfTag, TypeOfTags } from "./tag";
|
|
54
|
+
import type { TypeOfTagGroup, TypeOfTagGroups } from "./tag-group";
|
|
55
|
+
import type { TypeOfTime } from "./time";
|
|
56
|
+
import type { TypeOfTracking } from "./tracking";
|
|
57
|
+
import type { TypeOfVehicle } from "./vehicle";
|
|
58
|
+
import type { TypeOfXInput } from "./xinput";
|
|
59
|
+
export type { TypeOfAck, TypeOfAction, TypeOfAddOn, TypeOfAddOns, TypeOfAddress, TypeOfAddresses, TypeOfAgent, TypeOfAgents, TypeOfAuthorization, TypeOfBilling, TypeOfBillings, TypeOfBreakUp, TypeOfCancellation, TypeOfCancellations, TypeOfCancellationTerm, TypeOfCancellationTerms, TypeOfCatalog, TypeOfCategory, TypeOfCategories, TypeOfCity, TypeOfCities, TypeOfContact, TypeOfContext, TypeOfCountry, TypeOfCountries, TypeOfCredential, TypeOfCredentials, TypeOfCustomer, TypeOfCustomers, TypeOfDecimalValue, TypeOfDescriptor, TypeOfDomain, TypeOfDuration, TypeOfError, TypeOfErrors, TypeOfFee, TypeOfFees, TypeOfForm, TypeOfFulfillment, TypeOfFulfillments, TypeOfFulfillmentState, TypeOfImage, TypeOfImages, TypeOfInstructions, TypeOfIntent, TypeOfIntents, TypeOfItem, TypeOfItems, TypeOfItemQuantity, TypeOfItemQuantities, TypeOfLocation, TypeOfLocations, TypeOfMediaFile, TypeOfMediaFiles, TypeOfMessage, TypeOfOffer, TypeOfOffers, TypeOfOption, TypeOfOptions, TypeOfOrder, TypeOfOrganization, TypeOfPayload, TypeOfPayment, TypeOfPayments, TypeOfPerson, TypeOfPrice, TypeOfPrices, TypeOfProvider, TypeOfProviders, TypeOfQuote, TypeOfRating, TypeOfReplacementTerm, TypeOfReplacementTerms, TypeOfReturnTerm, TypeOfReturnTerms, TypeOfScalar, TypeOfScalars, TypeOfSchedule, TypeOfState, TypeOfStates, TypeOfSupport, TypeOfTag, TypeOfTags, TypeOfTagGroup, TypeOfTagGroups, TypeOfTime, TypeOfTracking, TypeOfVehicle, TypeOfXInput, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TypeOfImages } from "./image";
|
|
2
|
+
import type { TypeOfMediaFiles } from "./media-file";
|
|
3
|
+
export type TypeOfInstructions = {
|
|
4
|
+
name?: string;
|
|
5
|
+
code?: string;
|
|
6
|
+
short_desc?: string;
|
|
7
|
+
long_desc?: string;
|
|
8
|
+
additional_desc?: {
|
|
9
|
+
url?: string;
|
|
10
|
+
content_type?: "text/plain" | "text/html" | "application/json";
|
|
11
|
+
};
|
|
12
|
+
media?: TypeOfMediaFiles;
|
|
13
|
+
images?: TypeOfImages;
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TypeOfCategory } from "./category";
|
|
2
|
+
import type { TypeOfDescriptor } from "./descriptor";
|
|
3
|
+
import type { TypeOfFulfillment } from "./fulfillment";
|
|
4
|
+
import type { TypeOfItem } from "./item";
|
|
5
|
+
import type { TypeOfOffer } from "./offer";
|
|
6
|
+
import type { TypeOfPayment } from "./payment";
|
|
7
|
+
import type { TypeOfProvider } from "./provider";
|
|
8
|
+
import type { TypeOfTagGroups } from "./tag-group";
|
|
9
|
+
export type TypeOfIntent = {
|
|
10
|
+
descriptor?: TypeOfDescriptor;
|
|
11
|
+
provider?: TypeOfProvider;
|
|
12
|
+
fulfillment?: TypeOfFulfillment;
|
|
13
|
+
payment?: TypeOfPayment;
|
|
14
|
+
category?: TypeOfCategory;
|
|
15
|
+
offer?: TypeOfOffer;
|
|
16
|
+
item?: TypeOfItem;
|
|
17
|
+
tags?: TypeOfTagGroups;
|
|
18
|
+
};
|
|
19
|
+
export type TypeOfIntents = TypeOfIntent[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TypeOfScalar } from "./scalar";
|
|
2
|
+
export type TypeOfItemQuantity = {
|
|
3
|
+
allocated?: {
|
|
4
|
+
count?: number;
|
|
5
|
+
measure?: TypeOfScalar;
|
|
6
|
+
};
|
|
7
|
+
available?: {
|
|
8
|
+
count?: number;
|
|
9
|
+
measure?: TypeOfScalar;
|
|
10
|
+
};
|
|
11
|
+
maximum?: {
|
|
12
|
+
count?: number;
|
|
13
|
+
measure?: TypeOfScalar;
|
|
14
|
+
};
|
|
15
|
+
minimum?: {
|
|
16
|
+
count?: number;
|
|
17
|
+
measure?: TypeOfScalar;
|
|
18
|
+
};
|
|
19
|
+
selected?: {
|
|
20
|
+
count?: number;
|
|
21
|
+
measure?: TypeOfScalar;
|
|
22
|
+
};
|
|
23
|
+
unitized?: {
|
|
24
|
+
count?: number;
|
|
25
|
+
measure?: TypeOfScalar;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export type TypeOfItemQuantities = TypeOfItemQuantity[];
|