@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
@@ -0,0 +1,61 @@
1
+ import type { TypeOfAddOns } from "./add-on";
2
+ import type { TypeOfAddress } from "./address";
3
+ import type { TypeOfCancellationTerms } from "./cancellation-terms";
4
+ import type { TypeOfCategory } from "./category";
5
+ import type { TypeOfCity } from "./city";
6
+ import type { TypeOfContact } from "./contact";
7
+ import type { TypeOfCredentials } from "./credential";
8
+ import type { TypeOfDescriptor } from "./descriptor";
9
+ import type { TypeOfFulfillment } from "./fulfillment";
10
+ import type { TypeOfFulfillmentState } from "./fulfillment-state";
11
+ import type { TypeOfItemQuantity } from "./item-quantity";
12
+ import type { TypeOfLocation } from "./location";
13
+ import type { TypeOfPayment } from "./payment";
14
+ import type { TypeOfPrice } from "./price";
15
+ import type { TypeOfRating } from "./rating";
16
+ import type { TypeOfReplacementTerms } from "./replacement-term";
17
+ import type { TypeOfReturnTerms } from "./return-term";
18
+ import type { TypeOfState } from "./state";
19
+ import type { TypeOfTagGroups } from "./tag-group";
20
+ import type { TypeOfTime } from "./time";
21
+ import type { TypeOfXInput } from "./xinput";
22
+ export type TypeOfItem = {
23
+ id?: string;
24
+ parent_item_id?: string;
25
+ parent_item_quantity?: TypeOfItemQuantity;
26
+ descriptor?: TypeOfDescriptor;
27
+ creator?: {
28
+ descriptor?: TypeOfDescriptor;
29
+ address?: TypeOfAddress;
30
+ state?: TypeOfState;
31
+ city?: TypeOfCity;
32
+ contact?: TypeOfContact;
33
+ creds?: TypeOfCredentials;
34
+ };
35
+ price?: TypeOfPrice;
36
+ quantity?: TypeOfItemQuantity;
37
+ category_ids?: TypeOfCategory["id"][];
38
+ fulfillment_ids?: TypeOfFulfillment["id"][];
39
+ location_ids?: TypeOfLocation["id"][];
40
+ payment_ids?: TypeOfPayment["id"][];
41
+ add_ons?: TypeOfAddOns;
42
+ cancellation_terms?: TypeOfCancellationTerms;
43
+ refund_terms?: {
44
+ fulfillment_state?: TypeOfFulfillmentState;
45
+ refund_eligible?: boolean;
46
+ refund_within?: TypeOfTime;
47
+ refund_amount?: TypeOfPrice;
48
+ }[];
49
+ replacement_terms?: TypeOfReplacementTerms;
50
+ return_terms?: TypeOfReturnTerms;
51
+ xinput?: TypeOfXInput;
52
+ time?: TypeOfTime;
53
+ rateable?: boolean;
54
+ rating?: TypeOfRating["value"];
55
+ matched?: boolean;
56
+ related?: boolean;
57
+ recommended?: boolean;
58
+ ttl?: string;
59
+ tags?: TypeOfTagGroups;
60
+ };
61
+ export type TypeOfItems = TypeOfItem[];
@@ -0,0 +1,23 @@
1
+ import type { TypeOfAddress } from "./address";
2
+ import type { TypeOfCity } from "./city";
3
+ import type { TypeOfCountry } from "./country";
4
+ import type { TypeOfDescriptor } from "./descriptor";
5
+ import type { TypeOfRating } from "./rating";
6
+ import type { TypeOfState } from "./state";
7
+ export type TypeOfLocation = {
8
+ id?: string;
9
+ descriptor?: TypeOfDescriptor;
10
+ map_url?: string;
11
+ gps?: string;
12
+ address?: TypeOfAddress;
13
+ city: TypeOfCity;
14
+ district?: string;
15
+ state?: TypeOfState;
16
+ country?: TypeOfCountry;
17
+ area_code?: string;
18
+ circle?: any;
19
+ polygon?: string;
20
+ "3dspace"?: string;
21
+ rating?: TypeOfRating["value"];
22
+ };
23
+ export type TypeOfLocations = TypeOfLocation[];
@@ -0,0 +1,7 @@
1
+ export type TypeOfMediaFile = {
2
+ mimetype?: string;
3
+ url?: string;
4
+ signature?: string;
5
+ dsa?: string;
6
+ };
7
+ export type TypeOfMediaFiles = TypeOfMediaFile[];
@@ -0,0 +1,55 @@
1
+ import type { TypeOfAck } from "./ack";
2
+ import type { TypeOfCatalog } from "./catalog";
3
+ import type { TypeOfIntent } from "./intent";
4
+ import type { TypeOfOrder } from "./order";
5
+ import type { TypeOfSupport } from "./support";
6
+ export type ForResponse = {
7
+ ack?: TypeOfAck;
8
+ };
9
+ export type ForSearch = {
10
+ intent?: TypeOfIntent;
11
+ };
12
+ export type ForOnSearch = {
13
+ catalog?: TypeOfCatalog;
14
+ };
15
+ export type ForSelect = {
16
+ order?: TypeOfOrder;
17
+ };
18
+ export type ForOnSelect = {
19
+ order?: TypeOfOrder;
20
+ };
21
+ export type ForInit = {
22
+ order?: TypeOfOrder;
23
+ };
24
+ export type ForOnInit = {
25
+ order?: TypeOfOrder;
26
+ };
27
+ export type ForConfirm = {
28
+ order?: TypeOfOrder;
29
+ };
30
+ export type ForOnConfirm = {
31
+ order?: TypeOfOrder;
32
+ };
33
+ export type ForUpdate = {
34
+ order?: TypeOfOrder;
35
+ update_target?: string;
36
+ };
37
+ export type ForOnUpdate = {
38
+ order?: TypeOfOrder;
39
+ };
40
+ export type ForStatus = {
41
+ order_id?: string;
42
+ ref_id?: string;
43
+ };
44
+ export type ForOnStatus = {
45
+ order?: TypeOfOrder;
46
+ catalog?: TypeOfCatalog;
47
+ };
48
+ export type ForSupport = {
49
+ support?: TypeOfSupport;
50
+ };
51
+ export type ForOnSupport = {
52
+ support?: TypeOfSupport;
53
+ };
54
+ export type ForRequest = ForSearch | ForOnSearch | ForSelect | ForOnSelect | ForInit | ForOnInit | ForConfirm | ForOnConfirm | ForUpdate | ForOnUpdate | ForStatus | ForOnStatus | ForSupport | ForOnSupport;
55
+ export type TypeOfMessage = ForRequest | ForResponse;
@@ -0,0 +1,16 @@
1
+ import type { TypeOfCategory } from "./category";
2
+ import type { TypeOfDescriptor } from "./descriptor";
3
+ import type { TypeOfItem } from "./item";
4
+ import type { TypeOfLocation } from "./location";
5
+ import type { TypeOfTagGroups } from "./tag-group";
6
+ import type { TypeOfTime } from "./time";
7
+ export type TypeOfOffer = {
8
+ id?: string;
9
+ descriptor?: TypeOfDescriptor;
10
+ location_ids?: TypeOfLocation["id"][];
11
+ category_ids?: TypeOfCategory["id"][];
12
+ item_ids?: TypeOfItem["id"][];
13
+ time?: TypeOfTime;
14
+ tags?: TypeOfTagGroups;
15
+ };
16
+ export type TypeOfOffers = TypeOfOffer[];
@@ -0,0 +1,6 @@
1
+ import type { TypeOfDescriptor } from "./descriptor";
2
+ export type TypeOfOption = {
3
+ id?: string;
4
+ descriptor?: TypeOfDescriptor;
5
+ };
6
+ export type TypeOfOptions = TypeOfOption[];
@@ -0,0 +1,44 @@
1
+ import type { TypeOfAddOns } from "./add-on";
2
+ import type { TypeOfBilling } from "./billing";
3
+ import type { TypeOfCancellation } from "./cancellation";
4
+ import type { TypeOfCancellationTerms } from "./cancellation-terms";
5
+ import type { TypeOfDescriptor } from "./descriptor";
6
+ import type { TypeOfFulfillments } from "./fulfillment";
7
+ import type { TypeOfItem, TypeOfItems } from "./item";
8
+ import type { TypeOfOffers } from "./offer";
9
+ import type { TypeOfPayments } from "./payment";
10
+ import type { TypeOfProvider } from "./provider";
11
+ import type { TypeOfQuote } from "./quote";
12
+ import type { TypeOfReplacementTerms } from "./replacement-term";
13
+ import type { TypeOfReturnTerms } from "./return-term";
14
+ import type { TypeOfTagGroups } from "./tag-group";
15
+ import type { TypeOfXInput } from "./xinput";
16
+ export type TypeOfOrder = {
17
+ id?: string;
18
+ ref_order_ids?: TypeOfOrder["id"][];
19
+ status?: "ACTIVE" | "COMPLETE" | "CANCELLED" | "CANCELLATION_INITIATED" | "ACCEPTED" | "REJECTED" | "CREATED" | "COMPLETED";
20
+ type?: "DRAFT" | "DEFAULT";
21
+ provider?: TypeOfProvider;
22
+ items?: TypeOfItems;
23
+ add_ons?: TypeOfAddOns;
24
+ offers?: TypeOfOffers;
25
+ billing?: TypeOfBilling;
26
+ fulfillments?: TypeOfFulfillments;
27
+ cancellation?: TypeOfCancellation;
28
+ cancellation_terms?: TypeOfCancellationTerms;
29
+ documents?: {
30
+ descriptor?: TypeOfDescriptor;
31
+ mime_type?: "text/html" | "application/html" | "application/xml" | "application/pdf";
32
+ url?: string;
33
+ old_policy_doc?: string;
34
+ }[];
35
+ refund_terms?: TypeOfItem["refund_terms"];
36
+ replacement_terms?: TypeOfReplacementTerms;
37
+ return_terms?: TypeOfReturnTerms;
38
+ quote?: TypeOfQuote;
39
+ payments?: TypeOfPayments;
40
+ created_at?: string;
41
+ updated_at?: string;
42
+ xinput?: TypeOfXInput;
43
+ tags?: TypeOfTagGroups;
44
+ };
@@ -0,0 +1,14 @@
1
+ import type { TypeOfAddress } from "./address";
2
+ import type { TypeOfCity } from "./city";
3
+ import type { TypeOfContact } from "./contact";
4
+ import type { TypeOfCredentials } from "./credential";
5
+ import type { TypeOfDescriptor } from "./descriptor";
6
+ import type { TypeOfState } from "./state";
7
+ export type TypeOfOrganization = {
8
+ descriptor?: TypeOfDescriptor;
9
+ address?: TypeOfAddress;
10
+ state?: TypeOfState;
11
+ city?: TypeOfCity;
12
+ contact?: TypeOfContact;
13
+ creds?: TypeOfCredentials;
14
+ };
@@ -0,0 +1,8 @@
1
+ import type { TypeOfContext } from "./context";
2
+ import type { TypeOfError } from "./error";
3
+ import type { TypeOfMessage } from "./message";
4
+ export type TypeOfPayload = {
5
+ context?: TypeOfContext;
6
+ message?: TypeOfMessage;
7
+ error?: TypeOfError;
8
+ };
@@ -0,0 +1,25 @@
1
+ import type { TypeOfTagGroups } from "./tag-group";
2
+ import type { TypeOfTime } from "./time";
3
+ export type TypeOfPayment = {
4
+ id?: string;
5
+ collected_by?: string;
6
+ url?: string;
7
+ params?: {
8
+ transaction_id?: string;
9
+ amount?: string;
10
+ currency?: string;
11
+ bank_code?: string;
12
+ bank_account_number?: string;
13
+ virtual_payment_address?: string;
14
+ source_bank_code?: string;
15
+ source_bank_account_number?: string;
16
+ source_virtual_payment_address?: string;
17
+ source_bank_account_name?: string;
18
+ bank_account_name?: string;
19
+ };
20
+ status?: "PAID" | "NOT-PAID" | "DELAYED" | "DEFERRED" | "FAILED";
21
+ type?: "PRE-ORDER" | "PRE-FULFILLMENT" | "ON-FULFILLMENT" | "POST-FULFILLMENT" | "ON-ORDER" | "PRE_ORDER" | "PRE_FULFILLMENT" | "ON_FULFILLMENT" | "POST_FULFILLMENT" | "ON_ORDER" | "REFUND";
22
+ time?: TypeOfTime;
23
+ tags?: TypeOfTagGroups;
24
+ };
25
+ export type TypeOfPayments = TypeOfPayment[];
@@ -0,0 +1,22 @@
1
+ import type { TypeOfCredentials } from "./credential";
2
+ import type { TypeOfImages } from "./image";
3
+ import type { TypeOfTagGroups } from "./tag-group";
4
+ export type TypeOfPerson = {
5
+ id?: string;
6
+ url?: string;
7
+ name?: string;
8
+ image?: TypeOfImages;
9
+ age?: string;
10
+ dob?: string;
11
+ gender?: string;
12
+ creds?: TypeOfCredentials;
13
+ languages?: {
14
+ name?: string;
15
+ code?: string;
16
+ }[];
17
+ skills?: {
18
+ name?: string;
19
+ code?: string;
20
+ }[];
21
+ tags?: TypeOfTagGroups;
22
+ };
@@ -0,0 +1,12 @@
1
+ import type { TypeOfDecimalValue } from "./decimal-value";
2
+ export type TypeOfPrice = {
3
+ currency?: string;
4
+ value?: TypeOfDecimalValue;
5
+ estimated_value?: TypeOfDecimalValue;
6
+ computed_value?: TypeOfDecimalValue;
7
+ listed_value?: TypeOfDecimalValue;
8
+ offered_value?: TypeOfDecimalValue;
9
+ minimum_value?: TypeOfDecimalValue;
10
+ maximum_value?: TypeOfDecimalValue;
11
+ };
12
+ export type TypeOfPrices = TypeOfPrice[];
@@ -0,0 +1,28 @@
1
+ import type { TypeOfCategories } from "./category";
2
+ import type { TypeOfDescriptor } from "./descriptor";
3
+ import type { TypeOfFulfillments } from "./fulfillment";
4
+ import type { TypeOfItems } from "./item";
5
+ import type { TypeOfLocations } from "./location";
6
+ import type { TypeOfOffers } from "./offer";
7
+ import type { TypeOfPayments } from "./payment";
8
+ import type { TypeOfRating } from "./rating";
9
+ import type { TypeOfTagGroups } from "./tag-group";
10
+ import type { TypeOfTime } from "./time";
11
+ export type TypeOfProvider = {
12
+ id?: string;
13
+ descriptor?: TypeOfDescriptor;
14
+ category_id?: string;
15
+ rating?: TypeOfRating["value"];
16
+ time?: TypeOfTime;
17
+ categories?: TypeOfCategories;
18
+ fulfillments?: TypeOfFulfillments;
19
+ payments?: TypeOfPayments;
20
+ locations?: TypeOfLocations;
21
+ offers?: TypeOfOffers;
22
+ items?: TypeOfItems;
23
+ exp?: string;
24
+ rateable?: boolean;
25
+ ttl?: string;
26
+ tags?: TypeOfTagGroups;
27
+ };
28
+ export type TypeOfProviders = TypeOfProvider[];
@@ -0,0 +1,8 @@
1
+ import type { TypeOfBreakUp } from "./breakup";
2
+ import type { TypeOfPrice } from "./price";
3
+ export type TypeOfQuote = {
4
+ id?: string;
5
+ ttl?: string;
6
+ price?: TypeOfPrice;
7
+ breakup?: TypeOfBreakUp;
8
+ };
@@ -0,0 +1,5 @@
1
+ export type TypeOfRating = {
2
+ rating_category?: "Item" | "Order" | "Fulfillment" | "Provider" | "Agent" | "Support";
3
+ id?: string;
4
+ value?: string;
5
+ };
@@ -0,0 +1,9 @@
1
+ import type { TypeOfFulfillmentState } from "./fulfillment-state";
2
+ import type { TypeOfMediaFile } from "./media-file";
3
+ import type { TypeOfTime } from "./time";
4
+ export type TypeOfReplacementTerm = {
5
+ fulfillment_state?: TypeOfFulfillmentState;
6
+ replace_within?: TypeOfTime;
7
+ external_ref?: TypeOfMediaFile;
8
+ };
9
+ export type TypeOfReplacementTerms = TypeOfReplacementTerm[];
@@ -0,0 +1,11 @@
1
+ import type { TypeOfFulfillmentState } from "./fulfillment-state";
2
+ import type { TypeOfLocation } from "./location";
3
+ import type { TypeOfTime } from "./time";
4
+ export type TypeOfReturnTerm = {
5
+ fulfillment_state?: TypeOfFulfillmentState;
6
+ return_eligible?: boolean;
7
+ return_time?: TypeOfTime;
8
+ return_location?: TypeOfLocation;
9
+ fulfillment_managed_by?: "CONSUMER" | "PROVIDER";
10
+ };
11
+ export type TypeOfReturnTerms = TypeOfReturnTerm[];
@@ -0,0 +1,13 @@
1
+ import type { TypeOfDecimalValue } from "./decimal-value";
2
+ export type TypeOfScalar = {
3
+ type?: "CONSTANT" | "VARIABLE";
4
+ value?: TypeOfDecimalValue;
5
+ estimated_value?: TypeOfDecimalValue;
6
+ computed_value?: TypeOfDecimalValue;
7
+ range?: {
8
+ min?: TypeOfDecimalValue;
9
+ max?: TypeOfDecimalValue;
10
+ };
11
+ unit?: string;
12
+ };
13
+ export type TypeOfScalars = TypeOfScalar[];
@@ -0,0 +1,5 @@
1
+ export type TypeOfSchedule = {
2
+ frequency?: string;
3
+ holidays?: string[];
4
+ times?: string[];
5
+ };
@@ -0,0 +1,5 @@
1
+ export type TypeOfState = {
2
+ name?: string;
3
+ code?: string;
4
+ };
5
+ export type TypeOfStates = TypeOfState[];
@@ -0,0 +1,8 @@
1
+ export type TypeOfSupport = {
2
+ order_id?: string;
3
+ ref_id?: string;
4
+ callback_phone?: string;
5
+ phone?: string;
6
+ email?: string;
7
+ url?: string;
8
+ };
@@ -0,0 +1,8 @@
1
+ import type { TypeOfDescriptor } from "./descriptor";
2
+ import type { TypeOfTags } from "./tag";
3
+ export type TypeOfTagGroup = {
4
+ display?: boolean;
5
+ descriptor?: TypeOfDescriptor;
6
+ list?: TypeOfTags;
7
+ };
8
+ export type TypeOfTagGroups = TypeOfTagGroup[];
@@ -0,0 +1,7 @@
1
+ import type { TypeOfDescriptor } from "./descriptor";
2
+ export type TypeOfTag = {
3
+ descriptor?: TypeOfDescriptor;
4
+ value?: string;
5
+ display?: boolean;
6
+ };
7
+ export type TypeOfTags = TypeOfTag[];
@@ -0,0 +1,13 @@
1
+ import type { TypeOfDuration } from "./duration";
2
+ import type { TypeOfSchedule } from "./schedule";
3
+ export type TypeOfTime = {
4
+ label?: string;
5
+ timestamp?: string;
6
+ duration?: TypeOfDuration;
7
+ range?: {
8
+ start?: string;
9
+ end?: string;
10
+ };
11
+ days?: string;
12
+ schedule?: TypeOfSchedule;
13
+ };
@@ -0,0 +1,7 @@
1
+ import type { TypeOfLocation } from "./location";
2
+ export type TypeOfTracking = {
3
+ id?: string;
4
+ url?: string;
5
+ location?: TypeOfLocation;
6
+ status?: "active" | "inactive";
7
+ };
@@ -0,0 +1,16 @@
1
+ export type TypeOfVehicle = {
2
+ category?: string;
3
+ capacity?: number;
4
+ make?: string;
5
+ model?: string;
6
+ size?: string;
7
+ variant?: string;
8
+ color?: string;
9
+ energy_type?: string;
10
+ registration?: string;
11
+ wheels_count?: string;
12
+ cargo_volumne?: string;
13
+ wheelchair_access?: string;
14
+ code?: string;
15
+ emission_standard?: string;
16
+ };
@@ -0,0 +1,22 @@
1
+ import type { TypeOfError } from "./error";
2
+ import type { TypeOfDescriptor } from "./descriptor";
3
+ import type { TypeOfForm } from "./form";
4
+ export type TypeOfXInput = {
5
+ head?: {
6
+ descriptor?: TypeOfDescriptor;
7
+ headings?: string[];
8
+ index?: {
9
+ cur?: number;
10
+ max?: number;
11
+ min?: number;
12
+ };
13
+ };
14
+ form?: TypeOfForm;
15
+ form_response?: {
16
+ status?: "PENDING" | "APPROVED" | "REJECTED" | "EXPIRED" | "SUCCESS";
17
+ signature?: string;
18
+ submission_id?: string;
19
+ errors?: TypeOfError[];
20
+ };
21
+ required?: boolean;
22
+ };
@@ -0,0 +1,2 @@
1
+ import 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 } from "./common";
2
+ 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,3 @@
1
+ import 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 } from "./FIS12";
2
+ import type { TypeOfResponse } from "./response";
3
+ 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, TypeOfResponse, TypeOfReturnTerm, TypeOfReturnTerms, TypeOfScalar, TypeOfScalars, TypeOfSchedule, TypeOfState, TypeOfStates, TypeOfSupport, TypeOfTag, TypeOfTags, TypeOfTagGroup, TypeOfTagGroups, TypeOfTime, TypeOfTracking, TypeOfVehicle, TypeOfXInput, };
@@ -0,0 +1,8 @@
1
+ import type { TypeOfError } from "./FIS12/common/error";
2
+ import type { TypeOfContext } from "./FIS12/common/context";
3
+ import type { ForResponse } from "./FIS12/common/message";
4
+ export type TypeOfResponse = {
5
+ context?: TypeOfContext;
6
+ message?: ForResponse;
7
+ error?: TypeOfError;
8
+ };
@@ -0,0 +1 @@
1
+ module.exports = {};
@@ -0,0 +1,2 @@
1
+ import 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, TypeOfResponse, TypeOfReturnTerm, TypeOfReturnTerms, TypeOfScalar, TypeOfScalars, TypeOfSchedule, TypeOfState, TypeOfStates, TypeOfSupport, TypeOfTag, TypeOfTags, TypeOfTagGroup, TypeOfTagGroups, TypeOfTime, TypeOfTracking, TypeOfVehicle, TypeOfXInput } from "./ONDC";
2
+ 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, TypeOfResponse, TypeOfReturnTerm, TypeOfReturnTerms, TypeOfScalar, TypeOfScalars, TypeOfSchedule, TypeOfState, TypeOfStates, TypeOfSupport, TypeOfTag, TypeOfTags, TypeOfTagGroup, TypeOfTagGroups, TypeOfTime, TypeOfTracking, TypeOfVehicle, TypeOfXInput, };
@@ -0,0 +1,2 @@
1
+ import 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, TypeOfResponse, TypeOfReturnTerm, TypeOfReturnTerms, TypeOfScalar, TypeOfScalars, TypeOfSchedule, TypeOfState, TypeOfStates, TypeOfSupport, TypeOfTag, TypeOfTags, TypeOfTagGroup, TypeOfTagGroups, TypeOfTime, TypeOfTracking, TypeOfVehicle, TypeOfXInput } from "./ONDC";
2
+ 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, TypeOfResponse, TypeOfReturnTerm, TypeOfReturnTerms, TypeOfScalar, TypeOfScalars, TypeOfSchedule, TypeOfState, TypeOfStates, TypeOfSupport, TypeOfTag, TypeOfTags, TypeOfTagGroup, TypeOfTagGroups, TypeOfTime, TypeOfTracking, TypeOfVehicle, TypeOfXInput, };
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "@aarthiklabs/credit-sdk",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "build:types": "tsc --project tsconfig.types.json",
10
+ "postbuild:types": "node scripts/post-build.mjs",
11
+ "lint": "eslint .",
12
+ "preview": "vite preview"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "exports": {
22
+ ".": {
23
+ "import": {
24
+ "types": "./dist/index.d.ts",
25
+ "default": "./dist/index.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/index.d.cts",
29
+ "default": "./dist/index.cjs"
30
+ }
31
+ },
32
+ "./types": {
33
+ "import": {
34
+ "types": "./dist/types/index.d.ts",
35
+ "default": "./dist/types/index.js"
36
+ },
37
+ "require": {
38
+ "types": "./dist/types/index.d.cts",
39
+ "default": "./dist/types/index.cjs"
40
+ }
41
+ },
42
+ "./hooks": {
43
+ "import": {
44
+ "types": "./dist/hooks/index.d.ts",
45
+ "default": "./dist/hooks/index.js"
46
+ },
47
+ "require": {
48
+ "types": "./dist/hooks/index.d.cts",
49
+ "default": "./dist/hooks/index.cjs"
50
+ }
51
+ },
52
+ "./components": {
53
+ "import": {
54
+ "types": "./dist/components/index.d.ts",
55
+ "default": "./dist/components/index.js"
56
+ },
57
+ "require": {
58
+ "types": "./dist/components/index.d.cts",
59
+ "default": "./dist/components/index.cjs"
60
+ }
61
+ }
62
+ },
63
+ "types": "./dist/index.d.ts",
64
+ "devDependencies": {
65
+ "@eslint/js": "^9.39.1",
66
+ "@types/node": "^24.10.1",
67
+ "@types/react": "^19.2.5",
68
+ "@types/react-dom": "^19.2.3",
69
+ "@vitejs/plugin-react": "^5.1.1",
70
+ "eslint": "^9.39.1",
71
+ "eslint-plugin-react-hooks": "^7.0.1",
72
+ "eslint-plugin-react-refresh": "^0.4.24",
73
+ "globals": "^16.5.0",
74
+ "react": "^19.2.3",
75
+ "react-dom": "^19.2.3",
76
+ "typescript": "~5.9.3",
77
+ "typescript-eslint": "^8.46.4",
78
+ "vite": "^7.2.4"
79
+ },
80
+ "peerDependencies": {
81
+ "react": "^19.2.3",
82
+ "react-dom": "^19.2.3"
83
+ }
84
+ }