@clientcasa/sdk 0.7.8 → 0.7.10
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 +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/models/api-error.d.ts +77 -0
- package/esm/models/api-error.d.ts.map +1 -1
- package/esm/models/api-error.js +77 -0
- package/esm/models/api-error.js.map +1 -1
- package/esm/types/smart-union.d.ts.map +1 -1
- package/esm/types/smart-union.js +13 -8
- package/esm/types/smart-union.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/api-error.ts +77 -0
- package/src/types/smart-union.ts +17 -8
package/README.md
CHANGED
|
@@ -179,7 +179,7 @@ MIT
|
|
|
179
179
|
<!-- Start Summary [summary] -->
|
|
180
180
|
## Summary
|
|
181
181
|
|
|
182
|
-
ClientCasa API: REST API for ClientCasa — proposals, contracts, time tracking, expenses, invoicing, payments, and CRM for solo operators and small teams.
|
|
182
|
+
ClientCasa API: REST API for ClientCasa — proposals, contracts, time tracking, expenses, invoicing, payments, and CRM for solo operators and small teams. Error-contract update (2026-10-21): actionable refusals retain their declared message; internal faults use safe generic copy. Several details.code values formerly grouped under invalid_payload or record_immutable now have specific codes. Integrations must branch on details.code, never message text; see the API changelog. New specific codes: invoice_amounts_locked, contract_not_deletable, receipt_lines_locked, sale_amounts_locked, quote_lines_locked, time_entry_billed_locked, primary_contact_not_deletable, account_address_reserved, email_address_suppressed, email_sending_limit, email_send_too_large, testimonial_archived, installment_required, installment_remainder_duplicate, installment_remainder_order, installment_percent_total, depreciation_months_invalid, account_address_invalid, receipt_client_required, receipt_recipients_required, receipt_email_required, email_subject_invalid, email_message_invalid, time_entry_client_required, form_address_required, form_address_invalid, form_condition_invalid, form_step_required, signed_document_revision_forbidden, deposit_invoice_required.
|
|
183
183
|
<!-- End Summary [summary] -->
|
|
184
184
|
|
|
185
185
|
<!-- Start Table of Contents [toc] -->
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "1.0.0";
|
|
34
|
-
readonly sdkVersion: "0.7.
|
|
35
|
-
readonly genVersion: "2.
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.7.
|
|
34
|
+
readonly sdkVersion: "0.7.10";
|
|
35
|
+
readonly genVersion: "2.952.5";
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.7.10 2.952.5 1.0.0 @clientcasa/sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -27,8 +27,8 @@ export function serverURLFromOptions(options) {
|
|
|
27
27
|
export const SDK_METADATA = {
|
|
28
28
|
language: "typescript",
|
|
29
29
|
openapiDocVersion: "1.0.0",
|
|
30
|
-
sdkVersion: "0.7.
|
|
31
|
-
genVersion: "2.
|
|
32
|
-
userAgent: "speakeasy-sdk/typescript 0.7.
|
|
30
|
+
sdkVersion: "0.7.10",
|
|
31
|
+
genVersion: "2.952.5",
|
|
32
|
+
userAgent: "speakeasy-sdk/typescript 0.7.10 2.952.5 1.0.0 @clientcasa/sdk",
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=config.js.map
|
package/esm/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAU,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;OAEG;IACH,4BAA4B;CACpB,CAAC;AA0BX,MAAM,UAAU,oBAAoB,C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AS,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;AAAA,CACnB;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,YAAY;IACtB,iBAAiB,EAAE,OAAO;IAC1B,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,+DAA+D;CAClE,CAAC"}
|
|
@@ -15,18 +15,88 @@ export declare const Code: {
|
|
|
15
15
|
readonly Gone: "gone";
|
|
16
16
|
readonly PayloadTooLarge: "payload_too_large";
|
|
17
17
|
readonly ClientError: "client_error";
|
|
18
|
+
readonly ServiceUnavailable: "service_unavailable";
|
|
18
19
|
readonly InternalError: "internal_error";
|
|
19
20
|
};
|
|
20
21
|
export type Code = OpenEnum<typeof Code>;
|
|
21
22
|
export declare const DetailsCode: {
|
|
23
|
+
readonly InvoiceAmountsLocked: "invoice_amounts_locked";
|
|
24
|
+
readonly ContractNotDeletable: "contract_not_deletable";
|
|
25
|
+
readonly ReceiptLinesLocked: "receipt_lines_locked";
|
|
26
|
+
readonly SaleAmountsLocked: "sale_amounts_locked";
|
|
27
|
+
readonly QuoteLinesLocked: "quote_lines_locked";
|
|
28
|
+
readonly TimeEntryBilledLocked: "time_entry_billed_locked";
|
|
29
|
+
readonly PrimaryContactNotDeletable: "primary_contact_not_deletable";
|
|
30
|
+
readonly AccountAddressReserved: "account_address_reserved";
|
|
31
|
+
readonly EmailAddressSuppressed: "email_address_suppressed";
|
|
32
|
+
readonly EmailSendingLimit: "email_sending_limit";
|
|
33
|
+
readonly EmailSendTooLarge: "email_send_too_large";
|
|
34
|
+
readonly TestimonialArchived: "testimonial_archived";
|
|
35
|
+
readonly InstallmentRequired: "installment_required";
|
|
36
|
+
readonly InstallmentRemainderDuplicate: "installment_remainder_duplicate";
|
|
37
|
+
readonly InstallmentRemainderOrder: "installment_remainder_order";
|
|
38
|
+
readonly InstallmentPercentTotal: "installment_percent_total";
|
|
39
|
+
readonly DepreciationMonthsInvalid: "depreciation_months_invalid";
|
|
40
|
+
readonly AccountAddressInvalid: "account_address_invalid";
|
|
41
|
+
readonly ReceiptClientRequired: "receipt_client_required";
|
|
42
|
+
readonly ReceiptRecipientsRequired: "receipt_recipients_required";
|
|
43
|
+
readonly ReceiptEmailRequired: "receipt_email_required";
|
|
44
|
+
readonly EmailSubjectInvalid: "email_subject_invalid";
|
|
45
|
+
readonly EmailMessageInvalid: "email_message_invalid";
|
|
46
|
+
readonly TimeEntryClientRequired: "time_entry_client_required";
|
|
47
|
+
readonly FormAddressRequired: "form_address_required";
|
|
48
|
+
readonly FormAddressInvalid: "form_address_invalid";
|
|
49
|
+
readonly FormConditionInvalid: "form_condition_invalid";
|
|
50
|
+
readonly FormStepRequired: "form_step_required";
|
|
51
|
+
readonly SignedDocumentRevisionForbidden: "signed_document_revision_forbidden";
|
|
52
|
+
readonly DepositInvoiceRequired: "deposit_invoice_required";
|
|
53
|
+
readonly CaseStudySourceImmutable: "case_study_source_immutable";
|
|
54
|
+
readonly CaseStudySourceInvalid: "case_study_source_invalid";
|
|
55
|
+
readonly MultiInstanceNotActive: "multi_instance_not_active";
|
|
56
|
+
readonly PublishToFinishRemoving: "publish_to_finish_removing";
|
|
57
|
+
readonly SectionAnchorInvalid: "section_anchor_invalid";
|
|
58
|
+
readonly SectionAnchorRequiresCommand: "section_anchor_requires_command";
|
|
59
|
+
readonly SectionAnchorReserved: "section_anchor_reserved";
|
|
60
|
+
readonly SectionBulkForbidden: "section_bulk_forbidden";
|
|
61
|
+
readonly SectionCommandScopeMismatch: "section_command_scope_mismatch";
|
|
62
|
+
readonly SectionConversionSourceDraft: "section_conversion_source_draft";
|
|
63
|
+
readonly SectionConversionWorkRemoved: "section_conversion_work_removed";
|
|
64
|
+
readonly SectionCreateMustBeHidden: "section_create_must_be_hidden";
|
|
65
|
+
readonly SectionCreateRequiresCommand: "section_create_requires_command";
|
|
66
|
+
readonly SectionDeleteRequiresPendingAdd: "section_delete_requires_pending_add";
|
|
67
|
+
readonly SectionDeleteRequiresRemove: "section_delete_requires_remove";
|
|
68
|
+
readonly SectionIdentityImmutable: "section_identity_immutable";
|
|
69
|
+
readonly SectionInsertionTargetMissing: "section_insertion_target_missing";
|
|
70
|
+
readonly SectionMainIdentityMissing: "section_main_identity_missing";
|
|
71
|
+
readonly SectionMainWriteRequiresCommand: "section_main_write_requires_command";
|
|
72
|
+
readonly SectionNavSiteMismatch: "section_nav_site_mismatch";
|
|
73
|
+
readonly SectionNavTargetAmbiguous: "section_nav_target_ambiguous";
|
|
74
|
+
readonly SectionNavTargetMissing: "section_nav_target_missing";
|
|
75
|
+
readonly SectionRemoveRequiresCommand: "section_remove_requires_command";
|
|
76
|
+
readonly SectionRestoreMustDraft: "section_restore_must_draft";
|
|
77
|
+
readonly SectionRestoreRequiresCommand: "section_restore_requires_command";
|
|
78
|
+
readonly SectionSingletonAnchorFixed: "section_singleton_anchor_fixed";
|
|
79
|
+
readonly SectionSingletonDuplicate: "section_singleton_duplicate";
|
|
80
|
+
readonly SectionSingletonRemove: "section_singleton_remove";
|
|
81
|
+
readonly SectionSiteCap: "section_site_cap";
|
|
82
|
+
readonly SectionSiteRequired: "section_site_required";
|
|
83
|
+
readonly SectionTypeCap: "section_type_cap";
|
|
84
|
+
readonly SectionTypeUnavailable: "section_type_unavailable";
|
|
85
|
+
readonly SectionVersionParentMissing: "section_version_parent_missing";
|
|
22
86
|
readonly ImpersonationWriteRefused: "impersonation_write_refused";
|
|
23
87
|
readonly ArchivedRecordReadOnly: "archived_record_read_only";
|
|
24
88
|
readonly PausedTransactionWindowLocked: "paused_transaction_window_locked";
|
|
89
|
+
readonly ExpenseRecognitionPeriodSealed: "expense_recognition_period_sealed";
|
|
25
90
|
readonly RecordHasDependents: "record_has_dependents";
|
|
26
91
|
readonly DuplicateRecord: "duplicate_record";
|
|
27
92
|
readonly RecordImmutable: "record_immutable";
|
|
28
93
|
readonly QuotaExceeded: "quota_exceeded";
|
|
29
94
|
readonly InvalidPayload: "invalid_payload";
|
|
95
|
+
readonly TimelineOperationExpired: "timeline_operation_expired";
|
|
96
|
+
readonly VendorCandidatesChanged: "vendor_candidates_changed";
|
|
97
|
+
readonly VendorChoiceRequired: "vendor_choice_required";
|
|
98
|
+
readonly CoachProposalNotApproved: "coach_proposal_not_approved";
|
|
99
|
+
readonly TimelineBaselineChanged: "timeline_baseline_changed";
|
|
30
100
|
readonly UnknownClientEmail: "unknown_client_email";
|
|
31
101
|
readonly AlreadyInState: "already_in_state";
|
|
32
102
|
readonly StatusSettled: "status_settled";
|
|
@@ -36,7 +106,13 @@ export declare const DetailsCode: {
|
|
|
36
106
|
readonly SetupRetryLimit: "setup_retry_limit";
|
|
37
107
|
readonly SigningSetupNeedsAttention: "signing_setup_needs_attention";
|
|
38
108
|
readonly GlobalModeHasAssignments: "global_mode_has_assignments";
|
|
109
|
+
readonly StarterMustBeAccountFree: "starter_must_be_account_free";
|
|
39
110
|
readonly UnsupportedFileType: "unsupported_file_type";
|
|
111
|
+
readonly ExpenseTableIntentLocked: "expense_table_intent_locked";
|
|
112
|
+
readonly ExpenseImportProposalLocked: "expense_import_proposal_locked";
|
|
113
|
+
readonly ExpenseImportDuplicateSource: "expense_import_duplicate_source";
|
|
114
|
+
readonly ExpenseTableMappingConflict: "expense_table_mapping_conflict";
|
|
115
|
+
readonly DocumentActionReviewStale: "document_action_review_stale";
|
|
40
116
|
readonly FileTooLarge: "file_too_large";
|
|
41
117
|
readonly CrossOrganization: "cross_organization";
|
|
42
118
|
readonly LinkedRecordNotFound: "linked_record_not_found";
|
|
@@ -78,6 +154,7 @@ export declare const DetailsCode: {
|
|
|
78
154
|
readonly SendDoorRequired: "send_door_required";
|
|
79
155
|
readonly ReceiptDoorRequired: "receipt_door_required";
|
|
80
156
|
readonly OutboxOrganizationFrozen: "outbox_organization_frozen";
|
|
157
|
+
readonly SupportTicketNumberExhausted: "support_ticket_number_exhausted";
|
|
81
158
|
readonly UnknownAssignmentId: "unknown_assignment_id";
|
|
82
159
|
};
|
|
83
160
|
export type DetailsCode = OpenEnum<typeof DetailsCode>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../src/models/api-error.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../src/models/api-error.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;CAeP,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEzC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyId,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAEvD,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CACtC,CAAC;AAEvB,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,CACpC,CAAC;AAEvC,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAM/D,CAAC;AAEJ,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAM9C;AAED,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAK9D,CAAC;AAEH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAM7C"}
|
package/esm/models/api-error.js
CHANGED
|
@@ -18,17 +18,87 @@ export const Code = {
|
|
|
18
18
|
Gone: "gone",
|
|
19
19
|
PayloadTooLarge: "payload_too_large",
|
|
20
20
|
ClientError: "client_error",
|
|
21
|
+
ServiceUnavailable: "service_unavailable",
|
|
21
22
|
InternalError: "internal_error",
|
|
22
23
|
};
|
|
23
24
|
export const DetailsCode = {
|
|
25
|
+
InvoiceAmountsLocked: "invoice_amounts_locked",
|
|
26
|
+
ContractNotDeletable: "contract_not_deletable",
|
|
27
|
+
ReceiptLinesLocked: "receipt_lines_locked",
|
|
28
|
+
SaleAmountsLocked: "sale_amounts_locked",
|
|
29
|
+
QuoteLinesLocked: "quote_lines_locked",
|
|
30
|
+
TimeEntryBilledLocked: "time_entry_billed_locked",
|
|
31
|
+
PrimaryContactNotDeletable: "primary_contact_not_deletable",
|
|
32
|
+
AccountAddressReserved: "account_address_reserved",
|
|
33
|
+
EmailAddressSuppressed: "email_address_suppressed",
|
|
34
|
+
EmailSendingLimit: "email_sending_limit",
|
|
35
|
+
EmailSendTooLarge: "email_send_too_large",
|
|
36
|
+
TestimonialArchived: "testimonial_archived",
|
|
37
|
+
InstallmentRequired: "installment_required",
|
|
38
|
+
InstallmentRemainderDuplicate: "installment_remainder_duplicate",
|
|
39
|
+
InstallmentRemainderOrder: "installment_remainder_order",
|
|
40
|
+
InstallmentPercentTotal: "installment_percent_total",
|
|
41
|
+
DepreciationMonthsInvalid: "depreciation_months_invalid",
|
|
42
|
+
AccountAddressInvalid: "account_address_invalid",
|
|
43
|
+
ReceiptClientRequired: "receipt_client_required",
|
|
44
|
+
ReceiptRecipientsRequired: "receipt_recipients_required",
|
|
45
|
+
ReceiptEmailRequired: "receipt_email_required",
|
|
46
|
+
EmailSubjectInvalid: "email_subject_invalid",
|
|
47
|
+
EmailMessageInvalid: "email_message_invalid",
|
|
48
|
+
TimeEntryClientRequired: "time_entry_client_required",
|
|
49
|
+
FormAddressRequired: "form_address_required",
|
|
50
|
+
FormAddressInvalid: "form_address_invalid",
|
|
51
|
+
FormConditionInvalid: "form_condition_invalid",
|
|
52
|
+
FormStepRequired: "form_step_required",
|
|
53
|
+
SignedDocumentRevisionForbidden: "signed_document_revision_forbidden",
|
|
54
|
+
DepositInvoiceRequired: "deposit_invoice_required",
|
|
55
|
+
CaseStudySourceImmutable: "case_study_source_immutable",
|
|
56
|
+
CaseStudySourceInvalid: "case_study_source_invalid",
|
|
57
|
+
MultiInstanceNotActive: "multi_instance_not_active",
|
|
58
|
+
PublishToFinishRemoving: "publish_to_finish_removing",
|
|
59
|
+
SectionAnchorInvalid: "section_anchor_invalid",
|
|
60
|
+
SectionAnchorRequiresCommand: "section_anchor_requires_command",
|
|
61
|
+
SectionAnchorReserved: "section_anchor_reserved",
|
|
62
|
+
SectionBulkForbidden: "section_bulk_forbidden",
|
|
63
|
+
SectionCommandScopeMismatch: "section_command_scope_mismatch",
|
|
64
|
+
SectionConversionSourceDraft: "section_conversion_source_draft",
|
|
65
|
+
SectionConversionWorkRemoved: "section_conversion_work_removed",
|
|
66
|
+
SectionCreateMustBeHidden: "section_create_must_be_hidden",
|
|
67
|
+
SectionCreateRequiresCommand: "section_create_requires_command",
|
|
68
|
+
SectionDeleteRequiresPendingAdd: "section_delete_requires_pending_add",
|
|
69
|
+
SectionDeleteRequiresRemove: "section_delete_requires_remove",
|
|
70
|
+
SectionIdentityImmutable: "section_identity_immutable",
|
|
71
|
+
SectionInsertionTargetMissing: "section_insertion_target_missing",
|
|
72
|
+
SectionMainIdentityMissing: "section_main_identity_missing",
|
|
73
|
+
SectionMainWriteRequiresCommand: "section_main_write_requires_command",
|
|
74
|
+
SectionNavSiteMismatch: "section_nav_site_mismatch",
|
|
75
|
+
SectionNavTargetAmbiguous: "section_nav_target_ambiguous",
|
|
76
|
+
SectionNavTargetMissing: "section_nav_target_missing",
|
|
77
|
+
SectionRemoveRequiresCommand: "section_remove_requires_command",
|
|
78
|
+
SectionRestoreMustDraft: "section_restore_must_draft",
|
|
79
|
+
SectionRestoreRequiresCommand: "section_restore_requires_command",
|
|
80
|
+
SectionSingletonAnchorFixed: "section_singleton_anchor_fixed",
|
|
81
|
+
SectionSingletonDuplicate: "section_singleton_duplicate",
|
|
82
|
+
SectionSingletonRemove: "section_singleton_remove",
|
|
83
|
+
SectionSiteCap: "section_site_cap",
|
|
84
|
+
SectionSiteRequired: "section_site_required",
|
|
85
|
+
SectionTypeCap: "section_type_cap",
|
|
86
|
+
SectionTypeUnavailable: "section_type_unavailable",
|
|
87
|
+
SectionVersionParentMissing: "section_version_parent_missing",
|
|
24
88
|
ImpersonationWriteRefused: "impersonation_write_refused",
|
|
25
89
|
ArchivedRecordReadOnly: "archived_record_read_only",
|
|
26
90
|
PausedTransactionWindowLocked: "paused_transaction_window_locked",
|
|
91
|
+
ExpenseRecognitionPeriodSealed: "expense_recognition_period_sealed",
|
|
27
92
|
RecordHasDependents: "record_has_dependents",
|
|
28
93
|
DuplicateRecord: "duplicate_record",
|
|
29
94
|
RecordImmutable: "record_immutable",
|
|
30
95
|
QuotaExceeded: "quota_exceeded",
|
|
31
96
|
InvalidPayload: "invalid_payload",
|
|
97
|
+
TimelineOperationExpired: "timeline_operation_expired",
|
|
98
|
+
VendorCandidatesChanged: "vendor_candidates_changed",
|
|
99
|
+
VendorChoiceRequired: "vendor_choice_required",
|
|
100
|
+
CoachProposalNotApproved: "coach_proposal_not_approved",
|
|
101
|
+
TimelineBaselineChanged: "timeline_baseline_changed",
|
|
32
102
|
UnknownClientEmail: "unknown_client_email",
|
|
33
103
|
AlreadyInState: "already_in_state",
|
|
34
104
|
StatusSettled: "status_settled",
|
|
@@ -38,7 +108,13 @@ export const DetailsCode = {
|
|
|
38
108
|
SetupRetryLimit: "setup_retry_limit",
|
|
39
109
|
SigningSetupNeedsAttention: "signing_setup_needs_attention",
|
|
40
110
|
GlobalModeHasAssignments: "global_mode_has_assignments",
|
|
111
|
+
StarterMustBeAccountFree: "starter_must_be_account_free",
|
|
41
112
|
UnsupportedFileType: "unsupported_file_type",
|
|
113
|
+
ExpenseTableIntentLocked: "expense_table_intent_locked",
|
|
114
|
+
ExpenseImportProposalLocked: "expense_import_proposal_locked",
|
|
115
|
+
ExpenseImportDuplicateSource: "expense_import_duplicate_source",
|
|
116
|
+
ExpenseTableMappingConflict: "expense_table_mapping_conflict",
|
|
117
|
+
DocumentActionReviewStale: "document_action_review_stale",
|
|
42
118
|
FileTooLarge: "file_too_large",
|
|
43
119
|
CrossOrganization: "cross_organization",
|
|
44
120
|
LinkedRecordNotFound: "linked_record_not_found",
|
|
@@ -80,6 +156,7 @@ export const DetailsCode = {
|
|
|
80
156
|
SendDoorRequired: "send_door_required",
|
|
81
157
|
ReceiptDoorRequired: "receipt_door_required",
|
|
82
158
|
OutboxOrganizationFrozen: "outbox_organization_frozen",
|
|
159
|
+
SupportTicketNumberExhausted: "support_ticket_number_exhausted",
|
|
83
160
|
UnknownAssignmentId: "unknown_assignment_id",
|
|
84
161
|
};
|
|
85
162
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-error.js","sourceRoot":"","sources":["../../src/models/api-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAGhD,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,WAAW;IACrB,gBAAgB,EAAE,oBAAoB;IACtC,cAAc,EAAE,iBAAiB;IACjC,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,qBAAqB;IACxC,oBAAoB,EAAE,wBAAwB;IAC9C,IAAI,EAAE,MAAM;IACZ,eAAe,EAAE,mBAAmB;IACpC,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,gBAAgB;CACvB,CAAC;AAGX,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,yBAAyB,EAAE,6BAA6B;IACxD,sBAAsB,EAAE,2BAA2B;IACnD,6BAA6B,EAAE,kCAAkC;IACjE,mBAAmB,EAAE,uBAAuB;IAC5C,eAAe,EAAE,kBAAkB;IACnC,eAAe,EAAE,kBAA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-
{"version":3,"file":"smart-union.d.ts","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAejC;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,SAAS,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,EAE3E,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"smart-union.d.ts","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAejC;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,SAAS,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,EAE3E,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAoEpE"}
|
package/esm/types/smart-union.js
CHANGED
|
@@ -13,26 +13,31 @@ import { startCountingUnrecognized } from "./unrecognized.js";
|
|
|
13
13
|
export function smartUnion(options) {
|
|
14
14
|
return z.pipe(z.unknown(), z.transform((input, ctx) => {
|
|
15
15
|
const candidates = [];
|
|
16
|
-
const errors =
|
|
16
|
+
const errors = [];
|
|
17
17
|
const parentUnrecognizedCtr = startCountingUnrecognized();
|
|
18
18
|
const parentZeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
19
19
|
// Filter out invalid options
|
|
20
|
-
for (const
|
|
20
|
+
for (const option of options) {
|
|
21
21
|
const unrecognizedCtr = startCountingUnrecognized();
|
|
22
22
|
const zeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
23
|
-
const result = option.
|
|
23
|
+
const result = option._zod.run({ value: input, issues: [] }, {
|
|
24
|
+
async: false,
|
|
25
|
+
});
|
|
26
|
+
if (result instanceof Promise) {
|
|
27
|
+
throw new z.core.$ZodAsyncError();
|
|
28
|
+
}
|
|
24
29
|
const inexactCount = unrecognizedCtr.end();
|
|
25
30
|
const zeroDefaultCount = zeroDefaultCtr.end();
|
|
26
|
-
if (result.
|
|
31
|
+
if (result.issues.length === 0) {
|
|
27
32
|
candidates.push({
|
|
28
|
-
data: result.
|
|
33
|
+
data: result.value,
|
|
29
34
|
inexactCount,
|
|
30
35
|
zeroDefaultCount,
|
|
31
36
|
fieldCount: -1, // We'll count this later if needed
|
|
32
37
|
});
|
|
33
38
|
continue;
|
|
34
39
|
}
|
|
35
|
-
errors
|
|
40
|
+
errors.push(result.issues);
|
|
36
41
|
}
|
|
37
42
|
// No valid options
|
|
38
43
|
if (candidates.length === 0) {
|
|
@@ -41,9 +46,9 @@ export function smartUnion(options) {
|
|
|
41
46
|
ctx.issues.push({
|
|
42
47
|
input: input,
|
|
43
48
|
code: "invalid_union",
|
|
44
|
-
errors: errors,
|
|
49
|
+
errors: errors.map(issues => issues.map(issue => z.core.util.finalizeIssue(issue, {}, z.core.config()))),
|
|
45
50
|
});
|
|
46
|
-
return
|
|
51
|
+
return undefined;
|
|
47
52
|
}
|
|
48
53
|
let best = candidates[0];
|
|
49
54
|
// Find the best option
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smart-union.js","sourceRoot":"","sources":["../../src/types/smart-union.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,yBAAyB;AACzB,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AA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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAAA,CAChD;AAED;;;;;GAKG;AACH,SAAS,oBAAoB,CAAC,MAAe,EAAU;IACrD,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,MAAM,KAAK,GAAc,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,SAAS;QACX,CAAC;QAED,kCAAkC;QAClC,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;QAC1B,IACE,KAAK,KAAK,IAAI;eACX,IAAI,KAAK,QAAQ;eACjB,IAAI,KAAK,QAAQ;eACjB,IAAI,KAAK,SAAS;eAClB,IAAI,KAAK,QAAQ;eACjB,KAAK,YAAY,IAAI;eACrB,KAAK,YAAY,OAAO,EAC3B,CAAC;YACD,UAAU,EAAE,CAAC;YACb,SAAS;QACX,CAAC;QAED,gBAAgB;QAChB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,iBAAiB;QACjB,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AAAA,CACnB"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "1.0.0",
|
|
64
|
-
sdkVersion: "0.7.
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.7.
|
|
64
|
+
sdkVersion: "0.7.10",
|
|
65
|
+
genVersion: "2.952.5",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.7.10 2.952.5 1.0.0 @clientcasa/sdk",
|
|
67
67
|
} as const;
|
package/src/models/api-error.ts
CHANGED
|
@@ -23,19 +23,89 @@ export const Code = {
|
|
|
23
23
|
Gone: "gone",
|
|
24
24
|
PayloadTooLarge: "payload_too_large",
|
|
25
25
|
ClientError: "client_error",
|
|
26
|
+
ServiceUnavailable: "service_unavailable",
|
|
26
27
|
InternalError: "internal_error",
|
|
27
28
|
} as const;
|
|
28
29
|
export type Code = OpenEnum<typeof Code>;
|
|
29
30
|
|
|
30
31
|
export const DetailsCode = {
|
|
32
|
+
InvoiceAmountsLocked: "invoice_amounts_locked",
|
|
33
|
+
ContractNotDeletable: "contract_not_deletable",
|
|
34
|
+
ReceiptLinesLocked: "receipt_lines_locked",
|
|
35
|
+
SaleAmountsLocked: "sale_amounts_locked",
|
|
36
|
+
QuoteLinesLocked: "quote_lines_locked",
|
|
37
|
+
TimeEntryBilledLocked: "time_entry_billed_locked",
|
|
38
|
+
PrimaryContactNotDeletable: "primary_contact_not_deletable",
|
|
39
|
+
AccountAddressReserved: "account_address_reserved",
|
|
40
|
+
EmailAddressSuppressed: "email_address_suppressed",
|
|
41
|
+
EmailSendingLimit: "email_sending_limit",
|
|
42
|
+
EmailSendTooLarge: "email_send_too_large",
|
|
43
|
+
TestimonialArchived: "testimonial_archived",
|
|
44
|
+
InstallmentRequired: "installment_required",
|
|
45
|
+
InstallmentRemainderDuplicate: "installment_remainder_duplicate",
|
|
46
|
+
InstallmentRemainderOrder: "installment_remainder_order",
|
|
47
|
+
InstallmentPercentTotal: "installment_percent_total",
|
|
48
|
+
DepreciationMonthsInvalid: "depreciation_months_invalid",
|
|
49
|
+
AccountAddressInvalid: "account_address_invalid",
|
|
50
|
+
ReceiptClientRequired: "receipt_client_required",
|
|
51
|
+
ReceiptRecipientsRequired: "receipt_recipients_required",
|
|
52
|
+
ReceiptEmailRequired: "receipt_email_required",
|
|
53
|
+
EmailSubjectInvalid: "email_subject_invalid",
|
|
54
|
+
EmailMessageInvalid: "email_message_invalid",
|
|
55
|
+
TimeEntryClientRequired: "time_entry_client_required",
|
|
56
|
+
FormAddressRequired: "form_address_required",
|
|
57
|
+
FormAddressInvalid: "form_address_invalid",
|
|
58
|
+
FormConditionInvalid: "form_condition_invalid",
|
|
59
|
+
FormStepRequired: "form_step_required",
|
|
60
|
+
SignedDocumentRevisionForbidden: "signed_document_revision_forbidden",
|
|
61
|
+
DepositInvoiceRequired: "deposit_invoice_required",
|
|
62
|
+
CaseStudySourceImmutable: "case_study_source_immutable",
|
|
63
|
+
CaseStudySourceInvalid: "case_study_source_invalid",
|
|
64
|
+
MultiInstanceNotActive: "multi_instance_not_active",
|
|
65
|
+
PublishToFinishRemoving: "publish_to_finish_removing",
|
|
66
|
+
SectionAnchorInvalid: "section_anchor_invalid",
|
|
67
|
+
SectionAnchorRequiresCommand: "section_anchor_requires_command",
|
|
68
|
+
SectionAnchorReserved: "section_anchor_reserved",
|
|
69
|
+
SectionBulkForbidden: "section_bulk_forbidden",
|
|
70
|
+
SectionCommandScopeMismatch: "section_command_scope_mismatch",
|
|
71
|
+
SectionConversionSourceDraft: "section_conversion_source_draft",
|
|
72
|
+
SectionConversionWorkRemoved: "section_conversion_work_removed",
|
|
73
|
+
SectionCreateMustBeHidden: "section_create_must_be_hidden",
|
|
74
|
+
SectionCreateRequiresCommand: "section_create_requires_command",
|
|
75
|
+
SectionDeleteRequiresPendingAdd: "section_delete_requires_pending_add",
|
|
76
|
+
SectionDeleteRequiresRemove: "section_delete_requires_remove",
|
|
77
|
+
SectionIdentityImmutable: "section_identity_immutable",
|
|
78
|
+
SectionInsertionTargetMissing: "section_insertion_target_missing",
|
|
79
|
+
SectionMainIdentityMissing: "section_main_identity_missing",
|
|
80
|
+
SectionMainWriteRequiresCommand: "section_main_write_requires_command",
|
|
81
|
+
SectionNavSiteMismatch: "section_nav_site_mismatch",
|
|
82
|
+
SectionNavTargetAmbiguous: "section_nav_target_ambiguous",
|
|
83
|
+
SectionNavTargetMissing: "section_nav_target_missing",
|
|
84
|
+
SectionRemoveRequiresCommand: "section_remove_requires_command",
|
|
85
|
+
SectionRestoreMustDraft: "section_restore_must_draft",
|
|
86
|
+
SectionRestoreRequiresCommand: "section_restore_requires_command",
|
|
87
|
+
SectionSingletonAnchorFixed: "section_singleton_anchor_fixed",
|
|
88
|
+
SectionSingletonDuplicate: "section_singleton_duplicate",
|
|
89
|
+
SectionSingletonRemove: "section_singleton_remove",
|
|
90
|
+
SectionSiteCap: "section_site_cap",
|
|
91
|
+
SectionSiteRequired: "section_site_required",
|
|
92
|
+
SectionTypeCap: "section_type_cap",
|
|
93
|
+
SectionTypeUnavailable: "section_type_unavailable",
|
|
94
|
+
SectionVersionParentMissing: "section_version_parent_missing",
|
|
31
95
|
ImpersonationWriteRefused: "impersonation_write_refused",
|
|
32
96
|
ArchivedRecordReadOnly: "archived_record_read_only",
|
|
33
97
|
PausedTransactionWindowLocked: "paused_transaction_window_locked",
|
|
98
|
+
ExpenseRecognitionPeriodSealed: "expense_recognition_period_sealed",
|
|
34
99
|
RecordHasDependents: "record_has_dependents",
|
|
35
100
|
DuplicateRecord: "duplicate_record",
|
|
36
101
|
RecordImmutable: "record_immutable",
|
|
37
102
|
QuotaExceeded: "quota_exceeded",
|
|
38
103
|
InvalidPayload: "invalid_payload",
|
|
104
|
+
TimelineOperationExpired: "timeline_operation_expired",
|
|
105
|
+
VendorCandidatesChanged: "vendor_candidates_changed",
|
|
106
|
+
VendorChoiceRequired: "vendor_choice_required",
|
|
107
|
+
CoachProposalNotApproved: "coach_proposal_not_approved",
|
|
108
|
+
TimelineBaselineChanged: "timeline_baseline_changed",
|
|
39
109
|
UnknownClientEmail: "unknown_client_email",
|
|
40
110
|
AlreadyInState: "already_in_state",
|
|
41
111
|
StatusSettled: "status_settled",
|
|
@@ -45,7 +115,13 @@ export const DetailsCode = {
|
|
|
45
115
|
SetupRetryLimit: "setup_retry_limit",
|
|
46
116
|
SigningSetupNeedsAttention: "signing_setup_needs_attention",
|
|
47
117
|
GlobalModeHasAssignments: "global_mode_has_assignments",
|
|
118
|
+
StarterMustBeAccountFree: "starter_must_be_account_free",
|
|
48
119
|
UnsupportedFileType: "unsupported_file_type",
|
|
120
|
+
ExpenseTableIntentLocked: "expense_table_intent_locked",
|
|
121
|
+
ExpenseImportProposalLocked: "expense_import_proposal_locked",
|
|
122
|
+
ExpenseImportDuplicateSource: "expense_import_duplicate_source",
|
|
123
|
+
ExpenseTableMappingConflict: "expense_table_mapping_conflict",
|
|
124
|
+
DocumentActionReviewStale: "document_action_review_stale",
|
|
49
125
|
FileTooLarge: "file_too_large",
|
|
50
126
|
CrossOrganization: "cross_organization",
|
|
51
127
|
LinkedRecordNotFound: "linked_record_not_found",
|
|
@@ -87,6 +163,7 @@ export const DetailsCode = {
|
|
|
87
163
|
SendDoorRequired: "send_door_required",
|
|
88
164
|
ReceiptDoorRequired: "receipt_door_required",
|
|
89
165
|
OutboxOrganizationFrozen: "outbox_organization_frozen",
|
|
166
|
+
SupportTicketNumberExhausted: "support_ticket_number_exhausted",
|
|
90
167
|
UnknownAssignmentId: "unknown_assignment_id",
|
|
91
168
|
} as const;
|
|
92
169
|
export type DetailsCode = OpenEnum<typeof DetailsCode>;
|
package/src/types/smart-union.ts
CHANGED
|
@@ -31,28 +31,33 @@ export function smartUnion<
|
|
|
31
31
|
z.unknown(),
|
|
32
32
|
z.transform((input, ctx) => {
|
|
33
33
|
const candidates: Candidate[] = [];
|
|
34
|
-
const errors: z.core.$
|
|
34
|
+
const errors: z.core.$ZodRawIssue[][] = [];
|
|
35
35
|
|
|
36
36
|
const parentUnrecognizedCtr = startCountingUnrecognized();
|
|
37
37
|
const parentZeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
38
38
|
|
|
39
39
|
// Filter out invalid options
|
|
40
|
-
for (const
|
|
40
|
+
for (const option of options) {
|
|
41
41
|
const unrecognizedCtr = startCountingUnrecognized();
|
|
42
42
|
const zeroDefaultCtr = startCountingDefaultToZeroValue();
|
|
43
|
-
const result = option.
|
|
43
|
+
const result = option._zod.run({ value: input, issues: [] }, {
|
|
44
|
+
async: false,
|
|
45
|
+
});
|
|
46
|
+
if (result instanceof Promise) {
|
|
47
|
+
throw new z.core.$ZodAsyncError();
|
|
48
|
+
}
|
|
44
49
|
const inexactCount = unrecognizedCtr.end();
|
|
45
50
|
const zeroDefaultCount = zeroDefaultCtr.end();
|
|
46
|
-
if (result.
|
|
51
|
+
if (result.issues.length === 0) {
|
|
47
52
|
candidates.push({
|
|
48
|
-
data: result.
|
|
53
|
+
data: result.value,
|
|
49
54
|
inexactCount,
|
|
50
55
|
zeroDefaultCount,
|
|
51
56
|
fieldCount: -1, // We'll count this later if needed
|
|
52
57
|
});
|
|
53
58
|
continue;
|
|
54
59
|
}
|
|
55
|
-
errors
|
|
60
|
+
errors.push(result.issues);
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
// No valid options
|
|
@@ -62,9 +67,13 @@ export function smartUnion<
|
|
|
62
67
|
ctx.issues.push({
|
|
63
68
|
input: input,
|
|
64
69
|
code: "invalid_union",
|
|
65
|
-
errors: errors
|
|
70
|
+
errors: errors.map(issues =>
|
|
71
|
+
issues.map(issue =>
|
|
72
|
+
z.core.util.finalizeIssue(issue, {}, z.core.config())
|
|
73
|
+
)
|
|
74
|
+
),
|
|
66
75
|
});
|
|
67
|
-
return
|
|
76
|
+
return undefined;
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
let best = candidates[0]!;
|