@matech/thebigpos-sdk 3.4.0-stag-1921 → 3.5.0-dev-2243

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 CHANGED
@@ -40,5 +40,44 @@ apiClient.api.getSiteConfiguration().then((response) => {
40
40
  });
41
41
  ```
42
42
 
43
+ ## Generate SDK from Swagger
44
+
45
+ To regenerate the SDK from a specific API version, run:
46
+
47
+ ```bash
48
+ npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/{version}/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --enum-style union
49
+ ```
50
+
51
+ Replace `{version}` with the target API version (e.g. `v2.34.0`):
52
+
53
+ ```bash
54
+ npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/v2.34.0/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --enum-style union
55
+ ```
56
+
57
+ Then apply the PATCH content-type fixup, passing the **same** spec that was given
58
+ to the generator. The generator does not propagate `application/json-patch+json`,
59
+ so this step sets each PATCH method's content type from the spec (no hard-coded
60
+ endpoint list):
61
+
62
+ ```bash
63
+ node scripts/apply-json-patch-content-type.js https://api.thebigpos.dev/swagger/v2.34.0/swagger.json
64
+ yarn build
65
+ ```
66
+
67
+ ## Publishing
68
+
69
+ 1. Update the `version` field in `package.json` before publishing.
70
+ 2. Build the project:
71
+
72
+ ```bash
73
+ yarn build
74
+ ```
75
+
76
+ 3. Publish to npm:
77
+
78
+ ```bash
79
+ yarn publish
80
+ ```
81
+
43
82
  ____
44
83
  © 2024 Mortgage Automation Technologies. All rights reserved
package/dist/index.d.ts CHANGED
@@ -91,12 +91,12 @@ export type AiUrlSourceScope = "FullDomain" | "SpecificPath";
91
91
  export type AiUrlSourceCategory = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
92
92
  export type AiUrlSourceApprovalStatus = "Pending" | "Approved" | "Rejected";
93
93
  export type AiUrlDomainStatus = "Approved" | "Rejected";
94
- export type AiStructuredDataType = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument" | "CitedPassages";
94
+ export type AiStructuredDataType = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument" | "CitedPassages" | "PendingLoanUpdate";
95
95
  export type AiPromptScope = "General" | "LoanSpecific";
96
96
  export type AiPromptCategory = "DocumentAnalysis" | "DataQuery" | "General" | "Action";
97
97
  export type AiGuardrailCategory = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
98
98
  export type AiDisplayHint = "Table" | "SummaryCards" | "RankedList" | "Comparison" | "ExecutiveBrief";
99
- export type AiAuditEventType = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected" | "LoanAccessDenied" | "AgentModelCall" | "AgentToolCallRequested" | "AgentToolCallCompleted" | "AgentToolCallFailed" | "AgentLoopLimitReached" | "RequestCancelled" | "KnowledgeBaseRetrieved" | "PromptResolutionFailed" | "PromptTriggerPublished" | "PromptTriggerSkipped" | "PromptRunCompleted";
99
+ export type AiAuditEventType = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected" | "LoanAccessDenied" | "AgentModelCall" | "AgentToolCallRequested" | "AgentToolCallCompleted" | "AgentToolCallFailed" | "AgentLoopLimitReached" | "RequestCancelled" | "KnowledgeBaseRetrieved" | "PromptResolutionFailed" | "PromptTriggerPublished" | "PromptTriggerSkipped" | "PromptRunCompleted" | "LoanUpdateProposed" | "LoanUpdateApplied" | "LoanUpdateRefused";
100
100
  export type AddressFamily = "Unspecified" | "Unix" | "InterNetwork" | "ImpLink" | "Pup" | "Chaos" | "NS" | "Ipx" | "Iso" | "Osi" | "Ecma" | "DataKit" | "Ccitt" | "Sna" | "DecNet" | "DataLink" | "Lat" | "HyperChannel" | "AppleTalk" | "NetBios" | "VoiceView" | "FireFox" | "Banyan" | "Atm" | "InterNetworkV6" | "Cluster" | "Ieee12844" | "Irda" | "NetworkDesigners" | "Max" | "Packet" | "ControllerAreaNetwork" | "Unknown";
101
101
  export interface ASOSettings {
102
102
  enabled: boolean;
@@ -495,6 +495,8 @@ export interface AiChatRequest {
495
495
  documentIds?: string[] | null;
496
496
  /** @format uuid */
497
497
  promptId?: string | null;
498
+ /** @format uuid */
499
+ pendingLoanUpdateId?: string | null;
498
500
  }
499
501
  export interface AiChatStructuredData {
500
502
  type: AiChatStructuredDataTypeEnum;
@@ -506,6 +508,8 @@ export interface AiChatStructuredData {
506
508
  generatedDocumentId?: string | null;
507
509
  generatedFileName?: string | null;
508
510
  passages?: AiCitedPassage[] | null;
511
+ /** @format uuid */
512
+ pendingLoanUpdateId?: string | null;
509
513
  }
510
514
  export interface AiCitedDocument {
511
515
  /** @format uuid */
@@ -751,6 +755,7 @@ export interface AiToolCatalogItem {
751
755
  toolName: string;
752
756
  displayName: string;
753
757
  description: string;
758
+ isWriteTool: boolean;
754
759
  }
755
760
  export interface AiUrlDomain {
756
761
  host: string;
@@ -3477,6 +3482,8 @@ export interface LoanDocument {
3477
3482
  losStatus: string;
3478
3483
  contents?: string | null;
3479
3484
  failoverDocumentPath?: string | null;
3485
+ /** @format int64 */
3486
+ fileSizeBytes?: number | null;
3480
3487
  /** @format date-time */
3481
3488
  sensitiveDataPurgedOn?: string | null;
3482
3489
  observedDocumentType?: LoanDocumentType | null;
@@ -4063,6 +4070,8 @@ export interface LoanRefinanceRequest {
4063
4070
  originalCost?: number | null;
4064
4071
  /** @format double */
4065
4072
  existingLiens?: number | null;
4073
+ /** @format int32 */
4074
+ yearAcquired?: number | null;
4066
4075
  purpose?: LoanRefinancePurpose | null;
4067
4076
  currentLoan?: LoanRefinanceCurrentLoanRequest | null;
4068
4077
  }
@@ -6360,6 +6369,8 @@ export interface UserLoanTask {
6360
6369
  completedDate?: string | null;
6361
6370
  /** @format date-time */
6362
6371
  createdAt: string;
6372
+ /** @format date */
6373
+ dueDate?: string | null;
6363
6374
  createdBy: User;
6364
6375
  submittedBy?: User | null;
6365
6376
  completedBy?: User | null;
@@ -6380,6 +6391,8 @@ export interface UserLoanTaskRequest {
6380
6391
  export interface UserLoanTaskUpdateRequest {
6381
6392
  status?: string | null;
6382
6393
  value?: string | null;
6394
+ /** @format date */
6395
+ dueDate?: string | null;
6383
6396
  }
6384
6397
  export interface UserMobilePhoneVerificationRequest {
6385
6398
  code: string;
@@ -6528,8 +6541,8 @@ export interface Workflow {
6528
6541
  icon: string;
6529
6542
  }
6530
6543
  export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
6531
- export type AiAuditLogEventTypeEnum = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected" | "LoanAccessDenied" | "AgentModelCall" | "AgentToolCallRequested" | "AgentToolCallCompleted" | "AgentToolCallFailed" | "AgentLoopLimitReached" | "RequestCancelled" | "KnowledgeBaseRetrieved" | "PromptResolutionFailed" | "PromptTriggerPublished" | "PromptTriggerSkipped" | "PromptRunCompleted";
6532
- export type AiChatStructuredDataTypeEnum = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument" | "CitedPassages";
6544
+ export type AiAuditLogEventTypeEnum = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected" | "LoanAccessDenied" | "AgentModelCall" | "AgentToolCallRequested" | "AgentToolCallCompleted" | "AgentToolCallFailed" | "AgentLoopLimitReached" | "RequestCancelled" | "KnowledgeBaseRetrieved" | "PromptResolutionFailed" | "PromptTriggerPublished" | "PromptTriggerSkipped" | "PromptRunCompleted" | "LoanUpdateProposed" | "LoanUpdateApplied" | "LoanUpdateRefused";
6545
+ export type AiChatStructuredDataTypeEnum = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument" | "CitedPassages" | "PendingLoanUpdate";
6533
6546
  export type AiCitedDocumentSourceTypeEnum = "File" | "FreeText";
6534
6547
  export type AiGuardrailCategoryEnum = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
6535
6548
  export type AiUrlSourceCategoryEnum = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
@@ -6675,7 +6688,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
6675
6688
  }
6676
6689
  /**
6677
6690
  * @title The Big POS API
6678
- * @version v3.4.0
6691
+ * @version v3.5.0
6679
6692
  * @termsOfService https://www.thebigpos.com/terms-of-use/
6680
6693
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
6681
6694
  */
@@ -10964,6 +10977,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10964
10977
  * @secure
10965
10978
  * @response `201` `TaskComment` Created
10966
10979
  * @response `404` `ProblemDetails` Not Found
10980
+ * @response `422` `UnprocessableEntity` Unprocessable Content
10967
10981
  */
10968
10982
  createLoanTaskComment: (loanId: string, userLoanTaskId: string, data: TaskCommentRequest, params?: RequestParams) => Promise<AxiosResponse<TaskComment, any, {}>>;
10969
10983
  /**
@@ -10976,6 +10990,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10976
10990
  * @secure
10977
10991
  * @response `200` `TaskComment` OK
10978
10992
  * @response `404` `ProblemDetails` Not Found
10993
+ * @response `422` `UnprocessableEntity` Unprocessable Content
10979
10994
  */
10980
10995
  replaceLoanTaskComment: (loanId: string, userLoanTaskId: string, commentId: string, data: TaskCommentRequest, params?: RequestParams) => Promise<AxiosResponse<TaskComment, any, {}>>;
10981
10996
  /**
package/dist/index.js CHANGED
@@ -86,7 +86,13 @@ export class HttpClient {
86
86
  const property = input[key];
87
87
  const propertyContent = property instanceof Array ? property : [property];
88
88
  for (const formItem of propertyContent) {
89
- const isFileType = formItem instanceof Blob || formItem instanceof File;
89
+ // React Native files are plain { uri, name, type } objects, not Blob/File.
90
+ const isReactNativeFile = !!formItem &&
91
+ typeof formItem === "object" &&
92
+ "uri" in formItem &&
93
+ "name" in formItem &&
94
+ "type" in formItem;
95
+ const isFileType = isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
90
96
  formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
91
97
  }
92
98
  return formData;
@@ -95,7 +101,7 @@ export class HttpClient {
95
101
  }
96
102
  /**
97
103
  * @title The Big POS API
98
- * @version v3.4.0
104
+ * @version v3.5.0
99
105
  * @termsOfService https://www.thebigpos.com/terms-of-use/
100
106
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
101
107
  */
@@ -3936,6 +3942,7 @@ export class Api extends HttpClient {
3936
3942
  * @secure
3937
3943
  * @response `201` `TaskComment` Created
3938
3944
  * @response `404` `ProblemDetails` Not Found
3945
+ * @response `422` `UnprocessableEntity` Unprocessable Content
3939
3946
  */
3940
3947
  createLoanTaskComment: (loanId, userLoanTaskId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/tasks/${userLoanTaskId}/comments`, method: "POST", body: data, secure: true, type: "application/json", format: "json" }, params)),
3941
3948
  /**
@@ -3948,6 +3955,7 @@ export class Api extends HttpClient {
3948
3955
  * @secure
3949
3956
  * @response `200` `TaskComment` OK
3950
3957
  * @response `404` `ProblemDetails` Not Found
3958
+ * @response `422` `UnprocessableEntity` Unprocessable Content
3951
3959
  */
3952
3960
  replaceLoanTaskComment: (loanId, userLoanTaskId, commentId, data, params = {}) => this.request(Object.assign({ path: `/api/loans/${loanId}/tasks/${userLoanTaskId}/comments/${commentId}`, method: "PUT", body: data, secure: true, type: "application/json", format: "json" }, params)),
3953
3961
  /**