@mergeapi/merge-node-client 2.1.3 → 2.2.0
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/.mock/definition/accounting/__package__.yml +77 -0
- package/.mock/definition/accounting/contacts.yml +280 -0
- package/.mock/definition/accounting/transactions.yml +128 -0
- package/.mock/definition/ats/__package__.yml +1 -0
- package/.mock/definition/filestorage/files.yml +16 -0
- package/.mock/definition/hris/__package__.yml +5 -5
- package/.mock/definition/hris/benefits.yml +2 -2
- package/.mock/definition/ticketing/__package__.yml +3 -3
- package/.mock/definition/ticketing/tickets.yml +3 -0
- package/Client.d.ts +3 -3
- package/Client.js +8 -8
- package/api/resources/accounting/resources/contacts/client/Client.d.ts +25 -0
- package/api/resources/accounting/resources/contacts/client/Client.js +144 -0
- package/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.d.ts +17 -0
- package/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.js +5 -0
- package/api/resources/accounting/resources/contacts/client/requests/index.d.ts +1 -0
- package/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.d.ts +33 -1
- package/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.js +32 -0
- package/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.d.ts +33 -1
- package/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.js +32 -0
- package/api/resources/accounting/types/PatchedContactRequest.d.ts +44 -0
- package/api/resources/accounting/types/PatchedContactRequest.js +5 -0
- package/api/resources/accounting/types/PatchedContactRequestAddressesItem.d.ts +5 -0
- package/api/resources/accounting/types/PatchedContactRequestAddressesItem.js +5 -0
- package/api/resources/accounting/types/index.d.ts +2 -0
- package/api/resources/accounting/types/index.js +2 -0
- package/api/resources/ats/types/EventTypeEnum.d.ts +2 -1
- package/api/resources/ats/types/EventTypeEnum.js +1 -0
- package/api/resources/filestorage/resources/files/client/Client.js +16 -2
- package/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.d.ts +2 -0
- package/api/resources/filestorage/resources/files/client/requests/FilesListRequest.d.ts +4 -0
- package/api/resources/hris/types/Benefit.d.ts +2 -2
- package/api/resources/index.d.ts +1 -1
- package/api/resources/index.js +2 -2
- package/api/resources/ticketing/resources/tickets/client/Client.js +4 -1
- package/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.d.ts +2 -0
- package/api/resources/ticketing/types/PatchedTicketRequest.d.ts +2 -2
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +8 -8
- package/dist/api/resources/accounting/resources/contacts/client/Client.d.ts +25 -0
- package/dist/api/resources/accounting/resources/contacts/client/Client.js +144 -0
- package/dist/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.d.ts +17 -0
- package/dist/api/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.js +5 -0
- package/dist/api/resources/accounting/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.d.ts +33 -1
- package/dist/api/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.js +32 -0
- package/dist/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.d.ts +33 -1
- package/dist/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.js +32 -0
- package/dist/api/resources/accounting/types/PatchedContactRequest.d.ts +44 -0
- package/dist/api/resources/accounting/types/PatchedContactRequest.js +5 -0
- package/dist/api/resources/accounting/types/PatchedContactRequestAddressesItem.d.ts +5 -0
- package/dist/api/resources/accounting/types/PatchedContactRequestAddressesItem.js +5 -0
- package/dist/api/resources/accounting/types/index.d.ts +2 -0
- package/dist/api/resources/accounting/types/index.js +2 -0
- package/dist/api/resources/ats/types/EventTypeEnum.d.ts +2 -1
- package/dist/api/resources/ats/types/EventTypeEnum.js +1 -0
- package/dist/api/resources/filestorage/resources/files/client/Client.js +16 -2
- package/dist/api/resources/filestorage/resources/files/client/requests/FilesDownloadRequestMetaListRequest.d.ts +2 -0
- package/dist/api/resources/filestorage/resources/files/client/requests/FilesListRequest.d.ts +4 -0
- package/dist/api/resources/hris/types/Benefit.d.ts +2 -2
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.js +2 -2
- package/dist/api/resources/ticketing/resources/tickets/client/Client.js +4 -1
- package/dist/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.d.ts +2 -0
- package/dist/api/resources/ticketing/types/PatchedTicketRequest.d.ts +2 -2
- package/dist/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.d.ts +13 -0
- package/dist/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.js +44 -0
- package/dist/serialization/resources/accounting/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/accounting/resources/contacts/client/requests/index.js +3 -1
- package/dist/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.d.ts +1 -1
- package/dist/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.js +32 -0
- package/dist/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.d.ts +1 -1
- package/dist/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.js +32 -0
- package/dist/serialization/resources/accounting/types/PatchedContactRequest.d.ts +27 -0
- package/dist/serialization/resources/accounting/types/PatchedContactRequest.js +58 -0
- package/dist/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.d.ts +11 -0
- package/dist/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.js +42 -0
- package/dist/serialization/resources/accounting/types/index.d.ts +2 -0
- package/dist/serialization/resources/accounting/types/index.js +2 -0
- package/dist/serialization/resources/ats/types/EventTypeEnum.d.ts +1 -1
- package/dist/serialization/resources/ats/types/EventTypeEnum.js +1 -0
- package/dist/serialization/resources/hris/types/Benefit.d.ts +1 -1
- package/dist/serialization/resources/hris/types/Benefit.js +1 -1
- package/dist/serialization/resources/index.d.ts +1 -1
- package/dist/serialization/resources/index.js +2 -2
- package/dist/serialization/resources/ticketing/types/PatchedTicketRequest.d.ts +1 -1
- package/dist/serialization/resources/ticketing/types/PatchedTicketRequest.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +1467 -1331
- package/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.d.ts +13 -0
- package/serialization/resources/accounting/resources/contacts/client/requests/PatchedContactEndpointRequest.js +44 -0
- package/serialization/resources/accounting/resources/contacts/client/requests/index.d.ts +1 -0
- package/serialization/resources/accounting/resources/contacts/client/requests/index.js +3 -1
- package/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.d.ts +1 -1
- package/serialization/resources/accounting/resources/transactions/types/TransactionsListRequestExpand.js +32 -0
- package/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.d.ts +1 -1
- package/serialization/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.js +32 -0
- package/serialization/resources/accounting/types/PatchedContactRequest.d.ts +27 -0
- package/serialization/resources/accounting/types/PatchedContactRequest.js +58 -0
- package/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.d.ts +11 -0
- package/serialization/resources/accounting/types/PatchedContactRequestAddressesItem.js +42 -0
- package/serialization/resources/accounting/types/index.d.ts +2 -0
- package/serialization/resources/accounting/types/index.js +2 -0
- package/serialization/resources/ats/types/EventTypeEnum.d.ts +1 -1
- package/serialization/resources/ats/types/EventTypeEnum.js +1 -0
- package/serialization/resources/hris/types/Benefit.d.ts +1 -1
- package/serialization/resources/hris/types/Benefit.js +1 -1
- package/serialization/resources/index.d.ts +1 -1
- package/serialization/resources/index.js +2 -2
- package/serialization/resources/ticketing/types/PatchedTicketRequest.d.ts +1 -1
- package/serialization/resources/ticketing/types/PatchedTicketRequest.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/api/resources/accounting/resources/transactions/types/TransactionsRetrieveRequestExpand.js
CHANGED
|
@@ -7,33 +7,65 @@ exports.TransactionsRetrieveRequestExpand = void 0;
|
|
|
7
7
|
exports.TransactionsRetrieveRequestExpand = {
|
|
8
8
|
Account: "account",
|
|
9
9
|
AccountAccountingPeriod: "account,accounting_period",
|
|
10
|
+
AccountCompany: "account,company",
|
|
11
|
+
AccountCompanyAccountingPeriod: "account,company,accounting_period",
|
|
10
12
|
AccountingPeriod: "accounting_period",
|
|
13
|
+
Company: "company",
|
|
14
|
+
CompanyAccountingPeriod: "company,accounting_period",
|
|
11
15
|
Contact: "contact",
|
|
12
16
|
ContactAccount: "contact,account",
|
|
13
17
|
ContactAccountAccountingPeriod: "contact,account,accounting_period",
|
|
18
|
+
ContactAccountCompany: "contact,account,company",
|
|
19
|
+
ContactAccountCompanyAccountingPeriod: "contact,account,company,accounting_period",
|
|
14
20
|
ContactAccountingPeriod: "contact,accounting_period",
|
|
21
|
+
ContactCompany: "contact,company",
|
|
22
|
+
ContactCompanyAccountingPeriod: "contact,company,accounting_period",
|
|
15
23
|
LineItems: "line_items",
|
|
16
24
|
LineItemsAccount: "line_items,account",
|
|
17
25
|
LineItemsAccountAccountingPeriod: "line_items,account,accounting_period",
|
|
26
|
+
LineItemsAccountCompany: "line_items,account,company",
|
|
27
|
+
LineItemsAccountCompanyAccountingPeriod: "line_items,account,company,accounting_period",
|
|
18
28
|
LineItemsAccountingPeriod: "line_items,accounting_period",
|
|
29
|
+
LineItemsCompany: "line_items,company",
|
|
30
|
+
LineItemsCompanyAccountingPeriod: "line_items,company,accounting_period",
|
|
19
31
|
LineItemsContact: "line_items,contact",
|
|
20
32
|
LineItemsContactAccount: "line_items,contact,account",
|
|
21
33
|
LineItemsContactAccountAccountingPeriod: "line_items,contact,account,accounting_period",
|
|
34
|
+
LineItemsContactAccountCompany: "line_items,contact,account,company",
|
|
35
|
+
LineItemsContactAccountCompanyAccountingPeriod: "line_items,contact,account,company,accounting_period",
|
|
22
36
|
LineItemsContactAccountingPeriod: "line_items,contact,accounting_period",
|
|
37
|
+
LineItemsContactCompany: "line_items,contact,company",
|
|
38
|
+
LineItemsContactCompanyAccountingPeriod: "line_items,contact,company,accounting_period",
|
|
23
39
|
LineItemsTrackingCategories: "line_items,tracking_categories",
|
|
24
40
|
LineItemsTrackingCategoriesAccount: "line_items,tracking_categories,account",
|
|
25
41
|
LineItemsTrackingCategoriesAccountAccountingPeriod: "line_items,tracking_categories,account,accounting_period",
|
|
42
|
+
LineItemsTrackingCategoriesAccountCompany: "line_items,tracking_categories,account,company",
|
|
43
|
+
LineItemsTrackingCategoriesAccountCompanyAccountingPeriod: "line_items,tracking_categories,account,company,accounting_period",
|
|
26
44
|
LineItemsTrackingCategoriesAccountingPeriod: "line_items,tracking_categories,accounting_period",
|
|
45
|
+
LineItemsTrackingCategoriesCompany: "line_items,tracking_categories,company",
|
|
46
|
+
LineItemsTrackingCategoriesCompanyAccountingPeriod: "line_items,tracking_categories,company,accounting_period",
|
|
27
47
|
LineItemsTrackingCategoriesContact: "line_items,tracking_categories,contact",
|
|
28
48
|
LineItemsTrackingCategoriesContactAccount: "line_items,tracking_categories,contact,account",
|
|
29
49
|
LineItemsTrackingCategoriesContactAccountAccountingPeriod: "line_items,tracking_categories,contact,account,accounting_period",
|
|
50
|
+
LineItemsTrackingCategoriesContactAccountCompany: "line_items,tracking_categories,contact,account,company",
|
|
51
|
+
LineItemsTrackingCategoriesContactAccountCompanyAccountingPeriod: "line_items,tracking_categories,contact,account,company,accounting_period",
|
|
30
52
|
LineItemsTrackingCategoriesContactAccountingPeriod: "line_items,tracking_categories,contact,accounting_period",
|
|
53
|
+
LineItemsTrackingCategoriesContactCompany: "line_items,tracking_categories,contact,company",
|
|
54
|
+
LineItemsTrackingCategoriesContactCompanyAccountingPeriod: "line_items,tracking_categories,contact,company,accounting_period",
|
|
31
55
|
TrackingCategories: "tracking_categories",
|
|
32
56
|
TrackingCategoriesAccount: "tracking_categories,account",
|
|
33
57
|
TrackingCategoriesAccountAccountingPeriod: "tracking_categories,account,accounting_period",
|
|
58
|
+
TrackingCategoriesAccountCompany: "tracking_categories,account,company",
|
|
59
|
+
TrackingCategoriesAccountCompanyAccountingPeriod: "tracking_categories,account,company,accounting_period",
|
|
34
60
|
TrackingCategoriesAccountingPeriod: "tracking_categories,accounting_period",
|
|
61
|
+
TrackingCategoriesCompany: "tracking_categories,company",
|
|
62
|
+
TrackingCategoriesCompanyAccountingPeriod: "tracking_categories,company,accounting_period",
|
|
35
63
|
TrackingCategoriesContact: "tracking_categories,contact",
|
|
36
64
|
TrackingCategoriesContactAccount: "tracking_categories,contact,account",
|
|
37
65
|
TrackingCategoriesContactAccountAccountingPeriod: "tracking_categories,contact,account,accounting_period",
|
|
66
|
+
TrackingCategoriesContactAccountCompany: "tracking_categories,contact,account,company",
|
|
67
|
+
TrackingCategoriesContactAccountCompanyAccountingPeriod: "tracking_categories,contact,account,company,accounting_period",
|
|
38
68
|
TrackingCategoriesContactAccountingPeriod: "tracking_categories,contact,accounting_period",
|
|
69
|
+
TrackingCategoriesContactCompany: "tracking_categories,contact,company",
|
|
70
|
+
TrackingCategoriesContactCompanyAccountingPeriod: "tracking_categories,contact,company,accounting_period",
|
|
39
71
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Merge from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* # The Contact Object
|
|
7
|
+
* ### Description
|
|
8
|
+
* A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from.
|
|
9
|
+
* * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true.
|
|
10
|
+
* * A `Contact` is a customer if the `is_customer` property is true.
|
|
11
|
+
*
|
|
12
|
+
* ### Usage Example
|
|
13
|
+
* Fetch from the `LIST Contacts` endpoint and view a company's contacts.
|
|
14
|
+
*/
|
|
15
|
+
export interface PatchedContactRequest {
|
|
16
|
+
/** The contact's name. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Whether the contact is a supplier. */
|
|
19
|
+
isSupplier?: boolean;
|
|
20
|
+
/** Whether the contact is a customer. */
|
|
21
|
+
isCustomer?: boolean;
|
|
22
|
+
/** The contact's email address. */
|
|
23
|
+
emailAddress?: string;
|
|
24
|
+
/** The contact's tax number. */
|
|
25
|
+
taxNumber?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The contact's status
|
|
28
|
+
*
|
|
29
|
+
* * `ACTIVE` - ACTIVE
|
|
30
|
+
* * `ARCHIVED` - ARCHIVED
|
|
31
|
+
*/
|
|
32
|
+
status?: string;
|
|
33
|
+
/** The currency the contact's transactions are in. */
|
|
34
|
+
currency?: string;
|
|
35
|
+
/** The company the contact belongs to. */
|
|
36
|
+
company?: string;
|
|
37
|
+
/** `Address` object IDs for the given `Contacts` object. */
|
|
38
|
+
addresses?: (Merge.accounting.PatchedContactRequestAddressesItem | undefined)[];
|
|
39
|
+
/** `AccountingPhoneNumber` object for the given `Contacts` object. */
|
|
40
|
+
phoneNumbers?: Merge.accounting.AccountingPhoneNumberRequest[];
|
|
41
|
+
integrationParams?: Record<string, unknown>;
|
|
42
|
+
linkedAccountParams?: Record<string, unknown>;
|
|
43
|
+
remoteFields?: Merge.accounting.RemoteFieldRequest[];
|
|
44
|
+
}
|
|
@@ -367,6 +367,8 @@ export * from "./PaginatedTaxRateList";
|
|
|
367
367
|
export * from "./PaginatedTrackingCategoryList";
|
|
368
368
|
export * from "./PaginatedTransactionList";
|
|
369
369
|
export * from "./PaginatedVendorCreditList";
|
|
370
|
+
export * from "./PatchedContactRequestAddressesItem";
|
|
371
|
+
export * from "./PatchedContactRequest";
|
|
370
372
|
export * from "./PatchedItemRequestRequestStatus";
|
|
371
373
|
export * from "./PatchedItemRequestRequestType";
|
|
372
374
|
export * from "./PatchedItemRequestRequest";
|
|
@@ -383,6 +383,8 @@ __exportStar(require("./PaginatedTaxRateList"), exports);
|
|
|
383
383
|
__exportStar(require("./PaginatedTrackingCategoryList"), exports);
|
|
384
384
|
__exportStar(require("./PaginatedTransactionList"), exports);
|
|
385
385
|
__exportStar(require("./PaginatedVendorCreditList"), exports);
|
|
386
|
+
__exportStar(require("./PatchedContactRequestAddressesItem"), exports);
|
|
387
|
+
__exportStar(require("./PatchedContactRequest"), exports);
|
|
386
388
|
__exportStar(require("./PatchedItemRequestRequestStatus"), exports);
|
|
387
389
|
__exportStar(require("./PatchedItemRequestRequestType"), exports);
|
|
388
390
|
__exportStar(require("./PatchedItemRequestRequest"), exports);
|
|
@@ -46,13 +46,14 @@
|
|
|
46
46
|
* * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED
|
|
47
47
|
* * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED
|
|
48
48
|
*/
|
|
49
|
-
export type EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" | "DELETED_REMOTE_PRODUCTION_API_KEY" | "CREATED_TEST_API_KEY" | "DELETED_TEST_API_KEY" | "REGENERATED_PRODUCTION_API_KEY" | "INVITED_USER" | "TWO_FACTOR_AUTH_ENABLED" | "TWO_FACTOR_AUTH_DISABLED" | "DELETED_LINKED_ACCOUNT" | "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" | "CREATED_DESTINATION" | "DELETED_DESTINATION" | "CHANGED_DESTINATION" | "CHANGED_SCOPES" | "CHANGED_PERSONAL_INFORMATION" | "CHANGED_ORGANIZATION_SETTINGS" | "ENABLED_INTEGRATION" | "DISABLED_INTEGRATION" | "ENABLED_CATEGORY" | "DISABLED_CATEGORY" | "CHANGED_PASSWORD" | "RESET_PASSWORD" | "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" | "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" | "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" | "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" | "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" | "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" | "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" | "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" | "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" | "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" | "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" | "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" | "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" | "FORCED_LINKED_ACCOUNT_RESYNC" | "MUTED_ISSUE" | "GENERATED_MAGIC_LINK" | "ENABLED_MERGE_WEBHOOK" | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED";
|
|
49
|
+
export type EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" | "DELETED_REMOTE_PRODUCTION_API_KEY" | "CREATED_TEST_API_KEY" | "DELETED_TEST_API_KEY" | "REGENERATED_PRODUCTION_API_KEY" | "REGENERATED_WEBHOOK_SIGNATURE" | "INVITED_USER" | "TWO_FACTOR_AUTH_ENABLED" | "TWO_FACTOR_AUTH_DISABLED" | "DELETED_LINKED_ACCOUNT" | "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" | "CREATED_DESTINATION" | "DELETED_DESTINATION" | "CHANGED_DESTINATION" | "CHANGED_SCOPES" | "CHANGED_PERSONAL_INFORMATION" | "CHANGED_ORGANIZATION_SETTINGS" | "ENABLED_INTEGRATION" | "DISABLED_INTEGRATION" | "ENABLED_CATEGORY" | "DISABLED_CATEGORY" | "CHANGED_PASSWORD" | "RESET_PASSWORD" | "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" | "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" | "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" | "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" | "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" | "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" | "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" | "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" | "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" | "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" | "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" | "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" | "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" | "FORCED_LINKED_ACCOUNT_RESYNC" | "MUTED_ISSUE" | "GENERATED_MAGIC_LINK" | "ENABLED_MERGE_WEBHOOK" | "DISABLED_MERGE_WEBHOOK" | "MERGE_WEBHOOK_TARGET_CHANGED" | "END_USER_CREDENTIALS_ACCESSED";
|
|
50
50
|
export declare const EventTypeEnum: {
|
|
51
51
|
readonly CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY";
|
|
52
52
|
readonly DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY";
|
|
53
53
|
readonly CreatedTestApiKey: "CREATED_TEST_API_KEY";
|
|
54
54
|
readonly DeletedTestApiKey: "DELETED_TEST_API_KEY";
|
|
55
55
|
readonly RegeneratedProductionApiKey: "REGENERATED_PRODUCTION_API_KEY";
|
|
56
|
+
readonly RegeneratedWebhookSignature: "REGENERATED_WEBHOOK_SIGNATURE";
|
|
56
57
|
readonly InvitedUser: "INVITED_USER";
|
|
57
58
|
readonly TwoFactorAuthEnabled: "TWO_FACTOR_AUTH_ENABLED";
|
|
58
59
|
readonly TwoFactorAuthDisabled: "TWO_FACTOR_AUTH_DISABLED";
|
|
@@ -10,6 +10,7 @@ exports.EventTypeEnum = {
|
|
|
10
10
|
CreatedTestApiKey: "CREATED_TEST_API_KEY",
|
|
11
11
|
DeletedTestApiKey: "DELETED_TEST_API_KEY",
|
|
12
12
|
RegeneratedProductionApiKey: "REGENERATED_PRODUCTION_API_KEY",
|
|
13
|
+
RegeneratedWebhookSignature: "REGENERATED_WEBHOOK_SIGNATURE",
|
|
13
14
|
InvitedUser: "INVITED_USER",
|
|
14
15
|
TwoFactorAuthEnabled: "TWO_FACTOR_AUTH_ENABLED",
|
|
15
16
|
TwoFactorAuthDisabled: "TWO_FACTOR_AUTH_DISABLED",
|
|
@@ -83,7 +83,7 @@ class Files {
|
|
|
83
83
|
__list() {
|
|
84
84
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
85
85
|
var _a, _b, _c, _d, _e, _f;
|
|
86
|
-
const { createdAfter, createdBefore, cursor, driveId, expand, folderId, includeDeletedData, includeRemoteData, includeShellData, mimeType, modifiedAfter, modifiedBefore, name, orderBy, pageSize, remoteId, } = request;
|
|
86
|
+
const { createdAfter, createdBefore, cursor, driveId, expand, folderId, includeDeletedData, includeRemoteData, includeShellData, mimeType, modifiedAfter, modifiedBefore, name, orderBy, pageSize, remoteCreatedAfter, remoteCreatedBefore, remoteId, } = request;
|
|
87
87
|
const _queryParams = {};
|
|
88
88
|
if (createdAfter != null) {
|
|
89
89
|
_queryParams["created_after"] = createdAfter.toISOString();
|
|
@@ -134,6 +134,12 @@ class Files {
|
|
|
134
134
|
if (pageSize != null) {
|
|
135
135
|
_queryParams["page_size"] = pageSize.toString();
|
|
136
136
|
}
|
|
137
|
+
if (remoteCreatedAfter != null) {
|
|
138
|
+
_queryParams["remote_created_after"] = remoteCreatedAfter.toISOString();
|
|
139
|
+
}
|
|
140
|
+
if (remoteCreatedBefore != null) {
|
|
141
|
+
_queryParams["remote_created_before"] = remoteCreatedBefore.toISOString();
|
|
142
|
+
}
|
|
137
143
|
if (remoteId != null) {
|
|
138
144
|
_queryParams["remote_id"] = remoteId;
|
|
139
145
|
}
|
|
@@ -488,7 +494,7 @@ class Files {
|
|
|
488
494
|
__downloadRequestMetaList() {
|
|
489
495
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
490
496
|
var _a, _b, _c, _d, _e, _f;
|
|
491
|
-
const { createdAfter, createdBefore, cursor, includeDeletedData, mimeTypes, modifiedAfter, modifiedBefore, orderBy, pageSize, } = request;
|
|
497
|
+
const { createdAfter, createdBefore, cursor, ids, includeDeletedData, mimeTypes, modifiedAfter, modifiedBefore, orderBy, pageSize, } = request;
|
|
492
498
|
const _queryParams = {};
|
|
493
499
|
if (createdAfter != null) {
|
|
494
500
|
_queryParams["created_after"] = createdAfter;
|
|
@@ -499,6 +505,14 @@ class Files {
|
|
|
499
505
|
if (cursor != null) {
|
|
500
506
|
_queryParams["cursor"] = cursor;
|
|
501
507
|
}
|
|
508
|
+
if (ids != null) {
|
|
509
|
+
if (Array.isArray(ids)) {
|
|
510
|
+
_queryParams["ids"] = ids.map((item) => item);
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
_queryParams["ids"] = ids;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
502
516
|
if (includeDeletedData != null) {
|
|
503
517
|
_queryParams["include_deleted_data"] = includeDeletedData.toString();
|
|
504
518
|
}
|
|
@@ -15,6 +15,8 @@ export interface FilesDownloadRequestMetaListRequest {
|
|
|
15
15
|
createdBefore?: string;
|
|
16
16
|
/** The pagination cursor value. */
|
|
17
17
|
cursor?: string;
|
|
18
|
+
/** If provided, will only return objects with the given IDs. Comma-separated list of strings. */
|
|
19
|
+
ids?: string | string[];
|
|
18
20
|
/** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */
|
|
19
21
|
includeDeletedData?: boolean;
|
|
20
22
|
/** A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our <a href='https://help.merge.dev/en/articles/8615316-file-export-and-download-specification' target='_blank'>export format help center article</a>. */
|
|
@@ -39,6 +39,10 @@ export interface FilesListRequest {
|
|
|
39
39
|
orderBy?: Merge.filestorage.FilesListRequestOrderBy;
|
|
40
40
|
/** Number of results to return per page. */
|
|
41
41
|
pageSize?: number;
|
|
42
|
+
/** If provided, will only return files created in the third party platform after this datetime. */
|
|
43
|
+
remoteCreatedAfter?: Date;
|
|
44
|
+
/** If provided, will only return files created in the third party platform before this datetime. */
|
|
45
|
+
remoteCreatedBefore?: Date;
|
|
42
46
|
/** The API provider's ID for the given object. */
|
|
43
47
|
remoteId?: string;
|
|
44
48
|
}
|
|
@@ -32,10 +32,10 @@ export interface Benefit {
|
|
|
32
32
|
startDate?: Date;
|
|
33
33
|
/** The day and time the benefit ended. */
|
|
34
34
|
endDate?: Date;
|
|
35
|
-
/** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */
|
|
36
|
-
remoteWasDeleted?: boolean;
|
|
37
35
|
/** The employer benefit plan the employee is enrolled in. */
|
|
38
36
|
employerBenefit?: string;
|
|
37
|
+
/** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */
|
|
38
|
+
remoteWasDeleted?: boolean;
|
|
39
39
|
fieldMappings?: Record<string, unknown>;
|
|
40
40
|
remoteData?: Merge.hris.RemoteData[];
|
|
41
41
|
}
|
package/api/resources/index.d.ts
CHANGED
package/api/resources/index.js
CHANGED
|
@@ -33,10 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.accounting = exports.ticketing = exports.hris = exports.
|
|
36
|
+
exports.accounting = exports.ticketing = exports.hris = exports.crm = exports.filestorage = exports.ats = void 0;
|
|
37
37
|
exports.ats = __importStar(require("./ats"));
|
|
38
|
-
exports.crm = __importStar(require("./crm"));
|
|
39
38
|
exports.filestorage = __importStar(require("./filestorage"));
|
|
39
|
+
exports.crm = __importStar(require("./crm"));
|
|
40
40
|
exports.hris = __importStar(require("./hris"));
|
|
41
41
|
exports.ticketing = __importStar(require("./ticketing"));
|
|
42
42
|
exports.accounting = __importStar(require("./accounting"));
|
|
@@ -83,7 +83,7 @@ class Tickets {
|
|
|
83
83
|
__list() {
|
|
84
84
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
85
85
|
var _a, _b, _c, _d, _e, _f;
|
|
86
|
-
const { accountId, assigneeIds, collectionIds, completedAfter, completedBefore, contactId, createdAfter, createdBefore, cursor, dueAfter, dueBefore, expand, includeDeletedData, includeRemoteData, includeRemoteFields, includeShellData, modifiedAfter, modifiedBefore, pageSize, parentTicketId, priority, remoteCreatedAfter, remoteCreatedBefore, remoteFields, remoteId, remoteUpdatedAfter, remoteUpdatedBefore, showEnumOrigins, status, tags, ticketType, ticketUrl, } = request;
|
|
86
|
+
const { accountId, assigneeIds, collectionIds, completedAfter, completedBefore, contactId, createdAfter, createdBefore, creatorId, cursor, dueAfter, dueBefore, expand, includeDeletedData, includeRemoteData, includeRemoteFields, includeShellData, modifiedAfter, modifiedBefore, pageSize, parentTicketId, priority, remoteCreatedAfter, remoteCreatedBefore, remoteFields, remoteId, remoteUpdatedAfter, remoteUpdatedBefore, showEnumOrigins, status, tags, ticketType, ticketUrl, } = request;
|
|
87
87
|
const _queryParams = {};
|
|
88
88
|
if (accountId != null) {
|
|
89
89
|
_queryParams["account_id"] = accountId;
|
|
@@ -109,6 +109,9 @@ class Tickets {
|
|
|
109
109
|
if (createdBefore != null) {
|
|
110
110
|
_queryParams["created_before"] = createdBefore.toISOString();
|
|
111
111
|
}
|
|
112
|
+
if (creatorId != null) {
|
|
113
|
+
_queryParams["creator_id"] = creatorId;
|
|
114
|
+
}
|
|
112
115
|
if (cursor != null) {
|
|
113
116
|
_queryParams["cursor"] = cursor;
|
|
114
117
|
}
|
|
@@ -25,6 +25,8 @@ export interface TicketsListRequest {
|
|
|
25
25
|
createdAfter?: Date;
|
|
26
26
|
/** If provided, will only return objects created before this datetime. */
|
|
27
27
|
createdBefore?: Date;
|
|
28
|
+
/** If provided, will only return tickets created by this creator_id. */
|
|
29
|
+
creatorId?: string;
|
|
28
30
|
/** The pagination cursor value. */
|
|
29
31
|
cursor?: string;
|
|
30
32
|
/** If provided, will only return tickets due after this datetime. */
|
|
@@ -52,8 +52,6 @@ export interface PatchedTicketRequest {
|
|
|
52
52
|
accessLevel?: Merge.ticketing.PatchedTicketRequestAccessLevel;
|
|
53
53
|
tags?: (string | undefined)[];
|
|
54
54
|
roles?: (string | undefined)[];
|
|
55
|
-
/** When the ticket was completed. */
|
|
56
|
-
completedAt?: Date;
|
|
57
55
|
/** The 3rd party url of the Ticket. */
|
|
58
56
|
ticketUrl?: string;
|
|
59
57
|
/**
|
|
@@ -65,6 +63,8 @@ export interface PatchedTicketRequest {
|
|
|
65
63
|
* * `LOW` - LOW
|
|
66
64
|
*/
|
|
67
65
|
priority?: Merge.ticketing.PatchedTicketRequestPriority;
|
|
66
|
+
/** When the ticket was completed. */
|
|
67
|
+
completedAt?: Date;
|
|
68
68
|
integrationParams?: Record<string, unknown>;
|
|
69
69
|
linkedAccountParams?: Record<string, unknown>;
|
|
70
70
|
remoteFields?: Merge.ticketing.RemoteFieldRequest[];
|
package/dist/Client.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import { Ats } from "./api/resources/ats/client/Client";
|
|
7
|
-
import { Crm } from "./api/resources/crm/client/Client";
|
|
8
7
|
import { Filestorage } from "./api/resources/filestorage/client/Client";
|
|
8
|
+
import { Crm } from "./api/resources/crm/client/Client";
|
|
9
9
|
import { Hris } from "./api/resources/hris/client/Client";
|
|
10
10
|
import { Ticketing } from "./api/resources/ticketing/client/Client";
|
|
11
11
|
import { Accounting } from "./api/resources/accounting/client/Client";
|
|
@@ -39,15 +39,15 @@ export declare namespace MergeClient {
|
|
|
39
39
|
export declare class MergeClient {
|
|
40
40
|
protected readonly _options: MergeClient.Options;
|
|
41
41
|
protected _ats: Ats | undefined;
|
|
42
|
-
protected _crm: Crm | undefined;
|
|
43
42
|
protected _filestorage: Filestorage | undefined;
|
|
43
|
+
protected _crm: Crm | undefined;
|
|
44
44
|
protected _hris: Hris | undefined;
|
|
45
45
|
protected _ticketing: Ticketing | undefined;
|
|
46
46
|
protected _accounting: Accounting | undefined;
|
|
47
47
|
constructor(_options: MergeClient.Options);
|
|
48
48
|
get ats(): Ats;
|
|
49
|
-
get crm(): Crm;
|
|
50
49
|
get filestorage(): Filestorage;
|
|
50
|
+
get crm(): Crm;
|
|
51
51
|
get hris(): Hris;
|
|
52
52
|
get ticketing(): Ticketing;
|
|
53
53
|
get accounting(): Accounting;
|
package/dist/Client.js
CHANGED
|
@@ -40,8 +40,8 @@ exports.MergeClient = void 0;
|
|
|
40
40
|
const core = __importStar(require("./core"));
|
|
41
41
|
const headers_1 = require("./core/headers");
|
|
42
42
|
const Client_1 = require("./api/resources/ats/client/Client");
|
|
43
|
-
const Client_2 = require("./api/resources/
|
|
44
|
-
const Client_3 = require("./api/resources/
|
|
43
|
+
const Client_2 = require("./api/resources/filestorage/client/Client");
|
|
44
|
+
const Client_3 = require("./api/resources/crm/client/Client");
|
|
45
45
|
const Client_4 = require("./api/resources/hris/client/Client");
|
|
46
46
|
const Client_5 = require("./api/resources/ticketing/client/Client");
|
|
47
47
|
const Client_6 = require("./api/resources/accounting/client/Client");
|
|
@@ -51,8 +51,8 @@ class MergeClient {
|
|
|
51
51
|
"X-Account-Token": _options === null || _options === void 0 ? void 0 : _options.accountToken,
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "@mergeapi/merge-node-client",
|
|
54
|
-
"X-Fern-SDK-Version": "2.
|
|
55
|
-
"User-Agent": "@mergeapi/merge-node-client/2.
|
|
54
|
+
"X-Fern-SDK-Version": "2.2.0",
|
|
55
|
+
"User-Agent": "@mergeapi/merge-node-client/2.2.0",
|
|
56
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
58
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -61,13 +61,13 @@ class MergeClient {
|
|
|
61
61
|
var _a;
|
|
62
62
|
return ((_a = this._ats) !== null && _a !== void 0 ? _a : (this._ats = new Client_1.Ats(this._options)));
|
|
63
63
|
}
|
|
64
|
-
get
|
|
64
|
+
get filestorage() {
|
|
65
65
|
var _a;
|
|
66
|
-
return ((_a = this.
|
|
66
|
+
return ((_a = this._filestorage) !== null && _a !== void 0 ? _a : (this._filestorage = new Client_2.Filestorage(this._options)));
|
|
67
67
|
}
|
|
68
|
-
get
|
|
68
|
+
get crm() {
|
|
69
69
|
var _a;
|
|
70
|
-
return ((_a = this.
|
|
70
|
+
return ((_a = this._crm) !== null && _a !== void 0 ? _a : (this._crm = new Client_3.Crm(this._options)));
|
|
71
71
|
}
|
|
72
72
|
get hris() {
|
|
73
73
|
var _a;
|
|
@@ -72,6 +72,31 @@ export declare class Contacts {
|
|
|
72
72
|
*/
|
|
73
73
|
retrieve(id: string, request?: Merge.accounting.ContactsRetrieveRequest, requestOptions?: Contacts.RequestOptions): core.HttpResponsePromise<Merge.accounting.Contact>;
|
|
74
74
|
private __retrieve;
|
|
75
|
+
/**
|
|
76
|
+
* Updates a `Contact` object with the given `id`.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} id
|
|
79
|
+
* @param {Merge.accounting.PatchedContactEndpointRequest} request
|
|
80
|
+
* @param {Contacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.accounting.contacts.partialUpdate("id", {
|
|
84
|
+
* model: {}
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
partialUpdate(id: string, request: Merge.accounting.PatchedContactEndpointRequest, requestOptions?: Contacts.RequestOptions): core.HttpResponsePromise<Merge.accounting.ContactResponse>;
|
|
88
|
+
private __partialUpdate;
|
|
89
|
+
/**
|
|
90
|
+
* Returns metadata for `Contact` PATCHs.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} id
|
|
93
|
+
* @param {Contacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.accounting.contacts.metaPatchRetrieve("id")
|
|
97
|
+
*/
|
|
98
|
+
metaPatchRetrieve(id: string, requestOptions?: Contacts.RequestOptions): core.HttpResponsePromise<Merge.accounting.MetaResponse>;
|
|
99
|
+
private __metaPatchRetrieve;
|
|
75
100
|
/**
|
|
76
101
|
* Returns metadata for `Contact` POSTs.
|
|
77
102
|
*
|
|
@@ -360,6 +360,150 @@ class Contacts {
|
|
|
360
360
|
}
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* Updates a `Contact` object with the given `id`.
|
|
365
|
+
*
|
|
366
|
+
* @param {string} id
|
|
367
|
+
* @param {Merge.accounting.PatchedContactEndpointRequest} request
|
|
368
|
+
* @param {Contacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* await client.accounting.contacts.partialUpdate("id", {
|
|
372
|
+
* model: {}
|
|
373
|
+
* })
|
|
374
|
+
*/
|
|
375
|
+
partialUpdate(id, request, requestOptions) {
|
|
376
|
+
return core.HttpResponsePromise.fromPromise(this.__partialUpdate(id, request, requestOptions));
|
|
377
|
+
}
|
|
378
|
+
__partialUpdate(id, request, requestOptions) {
|
|
379
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
380
|
+
var _a, _b, _c, _d, _e, _f;
|
|
381
|
+
const { isDebugMode, runAsync } = request, _body = __rest(request, ["isDebugMode", "runAsync"]);
|
|
382
|
+
const _queryParams = {};
|
|
383
|
+
if (isDebugMode != null) {
|
|
384
|
+
_queryParams["is_debug_mode"] = isDebugMode.toString();
|
|
385
|
+
}
|
|
386
|
+
if (runAsync != null) {
|
|
387
|
+
_queryParams["run_async"] = runAsync.toString();
|
|
388
|
+
}
|
|
389
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
390
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
391
|
+
"X-Account-Token": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.accountToken) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.accountToken,
|
|
392
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
393
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
394
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, `accounting/v1/contacts/${encodeURIComponent(id)}`),
|
|
395
|
+
method: "PATCH",
|
|
396
|
+
headers: _headers,
|
|
397
|
+
contentType: "application/json",
|
|
398
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
399
|
+
requestType: "json",
|
|
400
|
+
body: serializers.accounting.PatchedContactEndpointRequest.jsonOrThrow(_body, {
|
|
401
|
+
unrecognizedObjectKeys: "strip",
|
|
402
|
+
}),
|
|
403
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
404
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
405
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
406
|
+
});
|
|
407
|
+
if (_response.ok) {
|
|
408
|
+
return {
|
|
409
|
+
data: serializers.accounting.ContactResponse.parseOrThrow(_response.body, {
|
|
410
|
+
unrecognizedObjectKeys: "passthrough",
|
|
411
|
+
allowUnrecognizedUnionMembers: true,
|
|
412
|
+
allowUnrecognizedEnumValues: true,
|
|
413
|
+
skipValidation: true,
|
|
414
|
+
breadcrumbsPrefix: ["response"],
|
|
415
|
+
}),
|
|
416
|
+
rawResponse: _response.rawResponse,
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
if (_response.error.reason === "status-code") {
|
|
420
|
+
throw new errors.MergeError({
|
|
421
|
+
statusCode: _response.error.statusCode,
|
|
422
|
+
body: _response.error.body,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
switch (_response.error.reason) {
|
|
427
|
+
case "non-json":
|
|
428
|
+
throw new errors.MergeError({
|
|
429
|
+
statusCode: _response.error.statusCode,
|
|
430
|
+
body: _response.error.rawBody,
|
|
431
|
+
rawResponse: _response.rawResponse,
|
|
432
|
+
});
|
|
433
|
+
case "timeout":
|
|
434
|
+
throw new errors.MergeTimeoutError("Timeout exceeded when calling PATCH /accounting/v1/contacts/{id}.");
|
|
435
|
+
case "unknown":
|
|
436
|
+
throw new errors.MergeError({
|
|
437
|
+
message: _response.error.errorMessage,
|
|
438
|
+
rawResponse: _response.rawResponse,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Returns metadata for `Contact` PATCHs.
|
|
445
|
+
*
|
|
446
|
+
* @param {string} id
|
|
447
|
+
* @param {Contacts.RequestOptions} requestOptions - Request-specific configuration.
|
|
448
|
+
*
|
|
449
|
+
* @example
|
|
450
|
+
* await client.accounting.contacts.metaPatchRetrieve("id")
|
|
451
|
+
*/
|
|
452
|
+
metaPatchRetrieve(id, requestOptions) {
|
|
453
|
+
return core.HttpResponsePromise.fromPromise(this.__metaPatchRetrieve(id, requestOptions));
|
|
454
|
+
}
|
|
455
|
+
__metaPatchRetrieve(id, requestOptions) {
|
|
456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
457
|
+
var _a, _b, _c, _d, _e, _f;
|
|
458
|
+
let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
459
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
460
|
+
"X-Account-Token": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.accountToken) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.accountToken,
|
|
461
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
462
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
463
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.MergeEnvironment.Production, `accounting/v1/contacts/meta/patch/${encodeURIComponent(id)}`),
|
|
464
|
+
method: "GET",
|
|
465
|
+
headers: _headers,
|
|
466
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
467
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
468
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
469
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
470
|
+
});
|
|
471
|
+
if (_response.ok) {
|
|
472
|
+
return {
|
|
473
|
+
data: serializers.accounting.MetaResponse.parseOrThrow(_response.body, {
|
|
474
|
+
unrecognizedObjectKeys: "passthrough",
|
|
475
|
+
allowUnrecognizedUnionMembers: true,
|
|
476
|
+
allowUnrecognizedEnumValues: true,
|
|
477
|
+
skipValidation: true,
|
|
478
|
+
breadcrumbsPrefix: ["response"],
|
|
479
|
+
}),
|
|
480
|
+
rawResponse: _response.rawResponse,
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
if (_response.error.reason === "status-code") {
|
|
484
|
+
throw new errors.MergeError({
|
|
485
|
+
statusCode: _response.error.statusCode,
|
|
486
|
+
body: _response.error.body,
|
|
487
|
+
rawResponse: _response.rawResponse,
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
switch (_response.error.reason) {
|
|
491
|
+
case "non-json":
|
|
492
|
+
throw new errors.MergeError({
|
|
493
|
+
statusCode: _response.error.statusCode,
|
|
494
|
+
body: _response.error.rawBody,
|
|
495
|
+
rawResponse: _response.rawResponse,
|
|
496
|
+
});
|
|
497
|
+
case "timeout":
|
|
498
|
+
throw new errors.MergeTimeoutError("Timeout exceeded when calling GET /accounting/v1/contacts/meta/patch/{id}.");
|
|
499
|
+
case "unknown":
|
|
500
|
+
throw new errors.MergeError({
|
|
501
|
+
message: _response.error.errorMessage,
|
|
502
|
+
rawResponse: _response.rawResponse,
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
}
|
|
363
507
|
/**
|
|
364
508
|
* Returns metadata for `Contact` POSTs.
|
|
365
509
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Merge from "../../../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* model: {}
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface PatchedContactEndpointRequest {
|
|
12
|
+
/** Whether to include debug fields (such as log file links) in the response. */
|
|
13
|
+
isDebugMode?: boolean;
|
|
14
|
+
/** Whether or not third-party updates should be run asynchronously. */
|
|
15
|
+
runAsync?: boolean;
|
|
16
|
+
model: Merge.accounting.PatchedContactRequest;
|
|
17
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type ContactsListRequest } from "./ContactsListRequest";
|
|
2
2
|
export { type ContactEndpointRequest } from "./ContactEndpointRequest";
|
|
3
3
|
export { type ContactsRetrieveRequest } from "./ContactsRetrieveRequest";
|
|
4
|
+
export { type PatchedContactEndpointRequest } from "./PatchedContactEndpointRequest";
|
|
4
5
|
export { type ContactsRemoteFieldClassesListRequest } from "./ContactsRemoteFieldClassesListRequest";
|