@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.
Files changed (85) hide show
  1. package/README.md +73 -0
  2. package/dist/components/index.cjs +1 -0
  3. package/dist/components/index.d.cts +1 -0
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/index.js +1 -0
  6. package/dist/core/errors/errors.d.ts +49 -0
  7. package/dist/core/errors/index.d.ts +1 -0
  8. package/dist/core/index.d.ts +1 -0
  9. package/dist/core/utilities/index.d.ts +1 -0
  10. package/dist/core/utilities/utilities.d.ts +26 -0
  11. package/dist/hooks/index.cjs +1 -0
  12. package/dist/hooks/index.d.cts +1 -0
  13. package/dist/hooks/index.d.ts +1 -0
  14. package/dist/hooks/index.js +1 -0
  15. package/dist/index.cjs +1 -0
  16. package/dist/index.d.cts +3 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +1 -0
  19. package/dist/types/ONDC/FIS12/common/ack.d.ts +5 -0
  20. package/dist/types/ONDC/FIS12/common/action.d.ts +1 -0
  21. package/dist/types/ONDC/FIS12/common/add-on.d.ts +12 -0
  22. package/dist/types/ONDC/FIS12/common/address.d.ts +2 -0
  23. package/dist/types/ONDC/FIS12/common/agent.d.ts +11 -0
  24. package/dist/types/ONDC/FIS12/common/authorization.d.ts +7 -0
  25. package/dist/types/ONDC/FIS12/common/billing.d.ts +16 -0
  26. package/dist/types/ONDC/FIS12/common/breakup.d.ts +9 -0
  27. package/dist/types/ONDC/FIS12/common/cancellation-terms.d.ts +14 -0
  28. package/dist/types/ONDC/FIS12/common/cancellation.d.ts +11 -0
  29. package/dist/types/ONDC/FIS12/common/catalog.d.ts +16 -0
  30. package/dist/types/ONDC/FIS12/common/category.d.ts +12 -0
  31. package/dist/types/ONDC/FIS12/common/city.d.ts +5 -0
  32. package/dist/types/ONDC/FIS12/common/contact.d.ts +5 -0
  33. package/dist/types/ONDC/FIS12/common/context.d.ts +18 -0
  34. package/dist/types/ONDC/FIS12/common/country.d.ts +5 -0
  35. package/dist/types/ONDC/FIS12/common/credential.d.ts +6 -0
  36. package/dist/types/ONDC/FIS12/common/customer.d.ts +9 -0
  37. package/dist/types/ONDC/FIS12/common/decimal-value.d.ts +1 -0
  38. package/dist/types/ONDC/FIS12/common/descriptor.d.ts +14 -0
  39. package/dist/types/ONDC/FIS12/common/domain.d.ts +6 -0
  40. package/dist/types/ONDC/FIS12/common/duration.d.ts +1 -0
  41. package/dist/types/ONDC/FIS12/common/error.d.ts +6 -0
  42. package/dist/types/ONDC/FIS12/common/fee.d.ts +6 -0
  43. package/dist/types/ONDC/FIS12/common/form.d.ts +8 -0
  44. package/dist/types/ONDC/FIS12/common/fulfillment-state.d.ts +6 -0
  45. package/dist/types/ONDC/FIS12/common/fulfillment.d.ts +38 -0
  46. package/dist/types/ONDC/FIS12/common/image.d.ts +7 -0
  47. package/dist/types/ONDC/FIS12/common/index.d.ts +59 -0
  48. package/dist/types/ONDC/FIS12/common/instructions.d.ts +14 -0
  49. package/dist/types/ONDC/FIS12/common/intent.d.ts +19 -0
  50. package/dist/types/ONDC/FIS12/common/item-quantity.d.ts +28 -0
  51. package/dist/types/ONDC/FIS12/common/item.d.ts +61 -0
  52. package/dist/types/ONDC/FIS12/common/location.d.ts +23 -0
  53. package/dist/types/ONDC/FIS12/common/media-file.d.ts +7 -0
  54. package/dist/types/ONDC/FIS12/common/message.d.ts +55 -0
  55. package/dist/types/ONDC/FIS12/common/offer.d.ts +16 -0
  56. package/dist/types/ONDC/FIS12/common/option.d.ts +6 -0
  57. package/dist/types/ONDC/FIS12/common/order.d.ts +44 -0
  58. package/dist/types/ONDC/FIS12/common/organization.d.ts +14 -0
  59. package/dist/types/ONDC/FIS12/common/payload.d.ts +8 -0
  60. package/dist/types/ONDC/FIS12/common/payment.d.ts +25 -0
  61. package/dist/types/ONDC/FIS12/common/person.d.ts +22 -0
  62. package/dist/types/ONDC/FIS12/common/price.d.ts +12 -0
  63. package/dist/types/ONDC/FIS12/common/provider.d.ts +28 -0
  64. package/dist/types/ONDC/FIS12/common/quote.d.ts +8 -0
  65. package/dist/types/ONDC/FIS12/common/rating.d.ts +5 -0
  66. package/dist/types/ONDC/FIS12/common/replacement-term.d.ts +9 -0
  67. package/dist/types/ONDC/FIS12/common/return-term.d.ts +11 -0
  68. package/dist/types/ONDC/FIS12/common/scalar.d.ts +13 -0
  69. package/dist/types/ONDC/FIS12/common/schedule.d.ts +5 -0
  70. package/dist/types/ONDC/FIS12/common/state.d.ts +5 -0
  71. package/dist/types/ONDC/FIS12/common/support.d.ts +8 -0
  72. package/dist/types/ONDC/FIS12/common/tag-group.d.ts +8 -0
  73. package/dist/types/ONDC/FIS12/common/tag.d.ts +7 -0
  74. package/dist/types/ONDC/FIS12/common/time.d.ts +13 -0
  75. package/dist/types/ONDC/FIS12/common/tracking.d.ts +7 -0
  76. package/dist/types/ONDC/FIS12/common/vehicle.d.ts +16 -0
  77. package/dist/types/ONDC/FIS12/common/xinput.d.ts +22 -0
  78. package/dist/types/ONDC/FIS12/index.d.ts +2 -0
  79. package/dist/types/ONDC/index.d.ts +3 -0
  80. package/dist/types/ONDC/response.d.ts +8 -0
  81. package/dist/types/index.cjs +1 -0
  82. package/dist/types/index.d.cts +2 -0
  83. package/dist/types/index.d.ts +2 -0
  84. package/dist/types/index.js +1 -0
  85. 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 = {};
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./hooks";
3
+ export * from "./components";
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./hooks";
3
+ export * from "./components";
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { TypeOfTagGroups } from "./tag-group";
2
+ export type TypeOfAck = {
3
+ status?: "ACK" | "NACK";
4
+ tags?: TypeOfTagGroups;
5
+ };
@@ -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,2 @@
1
+ export type TypeOfAddress = string;
2
+ export type TypeOfAddresses = TypeOfAddress[];
@@ -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,7 @@
1
+ export type TypeOfAuthorization = {
2
+ type?: string;
3
+ token?: string;
4
+ valid_from?: string;
5
+ valid_to?: string;
6
+ status?: string;
7
+ };
@@ -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,9 @@
1
+ import type { TypeOfItem } from "./item";
2
+ import type { TypeOfPrice } from "./price";
3
+ type TypeOfBreakUpComponent = {
4
+ item?: TypeOfItem;
5
+ title?: string;
6
+ price?: TypeOfPrice;
7
+ };
8
+ export type TypeOfBreakUp = TypeOfBreakUpComponent[];
9
+ export {};
@@ -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,5 @@
1
+ export type TypeOfCity = {
2
+ name?: string;
3
+ code?: string;
4
+ };
5
+ export type TypeOfCities = TypeOfCity[];
@@ -0,0 +1,5 @@
1
+ export type TypeOfContact = {
2
+ phone?: string;
3
+ email?: string;
4
+ jcard?: any;
5
+ };
@@ -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,5 @@
1
+ export type TypeOfCountry = {
2
+ name?: string;
3
+ code?: "IND";
4
+ };
5
+ export type TypeOfCountries = TypeOfCountry[];
@@ -0,0 +1,6 @@
1
+ export type TypeOfCredential = {
2
+ id?: string;
3
+ type?: string;
4
+ url?: string;
5
+ };
6
+ export type TypeOfCredentials = TypeOfCredential[];
@@ -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,6 @@
1
+ import type { TypeOfMediaFile } from "./media-file";
2
+ export type TypeOfDomain = {
3
+ name?: "ONDC:FIS12";
4
+ code?: "ONDC:FIS12";
5
+ additional_info?: TypeOfMediaFile;
6
+ };
@@ -0,0 +1 @@
1
+ export type TypeOfDuration = string;
@@ -0,0 +1,6 @@
1
+ export type TypeOfError = {
2
+ code?: string;
3
+ message?: string;
4
+ paths?: string;
5
+ };
6
+ export type TypeOfErrors = TypeOfError[];
@@ -0,0 +1,6 @@
1
+ import type { TypeOfPrice } from "./price";
2
+ export type TypeOfFee = {
3
+ percentage?: string;
4
+ amount?: TypeOfPrice;
5
+ };
6
+ export type TypeOfFees = TypeOfFee[];
@@ -0,0 +1,8 @@
1
+ export type TypeOfForm = {
2
+ id?: string;
3
+ url?: string;
4
+ data?: Record<string, string>;
5
+ mime_type?: "text/html" | "application/html" | "application/xml" | "text/html-multi" | "none";
6
+ resubmit?: boolean;
7
+ multiple_sumbissions?: boolean;
8
+ };
@@ -0,0 +1,6 @@
1
+ import type { TypeOfDescriptor } from "./descriptor";
2
+ export type TypeOfFulfillmentState = {
3
+ descriptor?: TypeOfDescriptor;
4
+ updated_at?: string;
5
+ updated_by?: string;
6
+ };
@@ -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,7 @@
1
+ export type TypeOfImage = {
2
+ url?: string;
3
+ size_type?: "xs" | "sm" | "md" | "lg" | "xl" | "custom";
4
+ width?: string;
5
+ height?: string;
6
+ };
7
+ export type TypeOfImages = TypeOfImage[];
@@ -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[];