diff --git a/types/chartmogul-node/chartmogul-node-tests.ts b/types/chartmogul-node/chartmogul-node-tests.ts index c0e0ccfe29aa45..76a64cd14c00a9 100644 --- a/types/chartmogul-node/chartmogul-node-tests.ts +++ b/types/chartmogul-node/chartmogul-node-tests.ts @@ -63,6 +63,47 @@ ChartMogul.DataSource.all(config, { with_invoice_handling_setting: true, }); +// $ExpectType Promise +ChartMogul.JsonImport.create(config, "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba", { + external_id: "ds_import_1", + customers: [{ external_id: "cus_001", name: "Test Customer" }], + plans: [{ name: "Gold", external_id: "gold", interval_count: 1, interval_unit: "month" }], + invoices: [{ + external_id: "inv_001", + date: "2023-04-02", + currency: "USD", + customer_external_id: "cus_001", + }], + line_items: [{ + type: "subscription", + amount_in_cents: 1000, + invoice_external_id: "inv_001", + subscription_external_id: "sub_001", + plan_external_id: "gold", + }], + transactions: [{ + type: "payment", + result: "successful", + date: "2023-04-02", + invoice_external_id: "inv_001", + }], + subscription_events: [{ + customer_external_id: "cus_001", + event_type: "subscription_start", + event_date: "2023-04-02", + effective_date: "2023-04-02", + subscription_external_id: "sub_001", + }], +}); + +// $ExpectType Promise +ChartMogul.JsonImport.create(config, "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba", { + external_id: "ds_import_2", +}); + +// $ExpectType Promise +ChartMogul.JsonImport.retrieve(config, "ds_1fm3eaac-62d0-31ec-clf4-4bf0mbe81aba", "ds_import_1"); + // $ExpectType Promise ChartMogul.Customer.create(config, { data_source_uuid: "", @@ -1138,6 +1179,52 @@ ChartMogul.Invoice.modify(config, "inv_f466e33d-ff2b-4a11-8f85-417eb02157a7", { // $ExpectType Promise ChartMogul.Invoice.destroy(config, ""); +// $ExpectType Promise +ChartMogul.Invoice.destroyAll(config, "ds_uuid", "cus_uuid"); + +// $ExpectType Promise +ChartMogul.Invoice.destroy_all(config, "ds_uuid", "cus_uuid"); // deprecated alias + +// $ExpectType Promise +ChartMogul.Invoice.updateStatus(config, "ds_uuid", "INV0001", { status: "voided" }); + +// $ExpectType Promise +ChartMogul.Invoice.updateStatus(config, "ds_uuid", "INV0001", { status: "written_off" }); + +// $ExpectType Promise +ChartMogul.Invoice.disable(config, "inv_565c73b2-85b9-49c9-a25e-2b7df6a677c9"); + +// $ExpectType Promise +ChartMogul.Invoice.disable(config, "inv_565c73b2-85b9-49c9-a25e-2b7df6a677c9", { reason: "duplicate" }); + +// $ExpectType Promise +ChartMogul.Invoice.enable(config, "inv_565c73b2-85b9-49c9-a25e-2b7df6a677c9"); + +// Invoice query-param methods (PIP-306) + +// $ExpectType Promise +ChartMogul.Invoice.update(config, { + qs: { data_source_uuid: "ds_uuid", external_id: "INV0001" }, + currency: "EUR", +}); + +// $ExpectType Promise +ChartMogul.Invoice.destroyByExternalId(config, { + qs: { data_source_uuid: "ds_uuid", external_id: "INV0001" }, +}); + +// $ExpectType Promise +ChartMogul.Invoice.disableByExternalId(config, { + data_source_uuid: "ds_uuid", + external_id: "INV0001", +}); + +// $ExpectType Promise +ChartMogul.Invoice.enableByExternalId(config, { + data_source_uuid: "ds_uuid", + external_id: "INV0001", +}); + ChartMogul.Invoice.all(config, "", { page: 1, }); @@ -1176,6 +1263,146 @@ ChartMogul.Transaction.create(config, "inv_565c73b2-85b9-49c9-a25e-2b7df6a677c9" transaction_fees_currency: "EUR", }); +// LineItem UUID-based methods + +// $ExpectType Promise +ChartMogul.LineItem.create(config, "inv_79eaad44-3379-4239-af83-2e0047dbebe6", { + type: "subscription", + amount_in_cents: 10000, + quantity: 1, + external_id: "li_ext_id_00762", + subscription_external_id: "sub_added_line_item_via_api_1", + plan_uuid: "pl_3eb4efb2-d101-4dce-a664-be271b0da4de", + service_period_start: "2022-11-01T00:00:00.000Z", + service_period_end: "2022-12-01T00:00:00.000Z", +}); + +// $ExpectType Promise +ChartMogul.LineItem.retrieve(config, "li_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// $ExpectType Promise +ChartMogul.LineItem.modify(config, "li_592f4699-107b-41b9-b7bc-a2aa2ca7a67b", { + amount_in_cents: 20000, +}); + +// $ExpectType Promise +ChartMogul.LineItem.destroy(config, "li_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// $ExpectType Promise +ChartMogul.LineItem.disable(config, "li_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// $ExpectType Promise +ChartMogul.LineItem.enable(config, "li_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// LineItem query-param methods (PIP-306) + +// $ExpectType Promise +ChartMogul.LineItem.all(config, { + data_source_uuid: "ds_uuid", + external_id: "li_ext_001", +}); + +// $ExpectType Promise +ChartMogul.LineItem.update(config, { + qs: { data_source_uuid: "ds_uuid", external_id: "li_ext_001" }, + amount_in_cents: 20000, +}); + +// $ExpectType Promise +ChartMogul.LineItem.destroyByExternalId(config, { + qs: { data_source_uuid: "ds_uuid", external_id: "li_ext_001" }, +}); + +// $ExpectType Promise +ChartMogul.LineItem.disable(config, { + data_source_uuid: "ds_uuid", + external_id: "li_ext_001", +}); + +// $ExpectType Promise +ChartMogul.LineItem.enable(config, { + data_source_uuid: "ds_uuid", + external_id: "li_ext_001", +}); + +// $ExpectType Promise +ChartMogul.LineItem.disableByExternalId(config, { + data_source_uuid: "ds_uuid", + external_id: "li_ext_001", +}); + +// $ExpectType Promise +ChartMogul.LineItem.enableByExternalId(config, { + data_source_uuid: "ds_uuid", + external_id: "li_ext_001", +}); + +// Transaction UUID-based methods + +// $ExpectType Promise +ChartMogul.Transaction.retrieve(config, "tr_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// $ExpectType Promise +ChartMogul.Transaction.modify(config, "tr_592f4699-107b-41b9-b7bc-a2aa2ca7a67b", { + result: "failed", +}); + +// $ExpectType Promise +ChartMogul.Transaction.destroy(config, "tr_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// $ExpectType Promise +ChartMogul.Transaction.disable(config, "tr_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// $ExpectType Promise +ChartMogul.Transaction.enable(config, "tr_592f4699-107b-41b9-b7bc-a2aa2ca7a67b"); + +// Transaction query-param methods (PIP-306) + +// $ExpectType Promise +ChartMogul.Transaction.all(config, { + data_source_uuid: "ds_uuid", + external_id: "tr_ext_001", +}); + +// $ExpectType Promise +ChartMogul.Transaction.update(config, { + qs: { data_source_uuid: "ds_uuid", external_id: "tr_ext_001" }, + result: "failed", +}); + +// $ExpectType Promise +ChartMogul.Transaction.destroyByExternalId(config, { + qs: { data_source_uuid: "ds_uuid", external_id: "tr_ext_001" }, +}); + +// $ExpectType Promise +ChartMogul.Transaction.disable(config, { + data_source_uuid: "ds_uuid", + external_id: "tr_ext_001", +}); + +// $ExpectType Promise +ChartMogul.Transaction.enable(config, { + data_source_uuid: "ds_uuid", + external_id: "tr_ext_001", +}); + +// $ExpectType Promise +ChartMogul.Transaction.disableByExternalId(config, { + data_source_uuid: "ds_uuid", + external_id: "tr_ext_001", +}); + +// $ExpectType Promise +ChartMogul.Transaction.enableByExternalId(config, { + data_source_uuid: "ds_uuid", + external_id: "tr_ext_001", +}); + +const txnWithError: ChartMogul.Transaction.Transaction = {}; +// $ExpectType string | null | undefined +txnWithError.error; + ChartMogul.Subscription.cancel(config, "", { cancelled_at: "", }); @@ -1454,6 +1681,41 @@ ChartMogul.SubscriptionEvent.deleteWithParams(config, { }, }); +// SubscriptionEvent flat params (auto-wrapped) + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.create(config, { + data_source_uuid: "ds_14336c0c-ab0b-11ec-8c55-c3902af70e1c", + customer_external_id: "cus_001", + event_type: "subscription_cancelled", + event_date: "2022-04-09T12:30:00.000Z", + effective_date: "2022-04-09T12:30:00.000Z", + subscription_external_id: "sub_001", +}); + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.updateWithParams(config, { + id: 12345, + event_type: "subscription_cancelled", +}); + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.deleteWithParams(config, { + id: 12345, +}); + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.disable(config, 12345); + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.disable(config, "12345"); + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.enable(config, 12345); + +// $ExpectType Promise +ChartMogul.SubscriptionEvent.enable(config, "12345"); + // Metrics.ActivitiesExport.create // $ExpectType Promise diff --git a/types/chartmogul-node/common.d.ts b/types/chartmogul-node/common.d.ts index 599b3a3136d20c..d20d45b62e6437 100644 --- a/types/chartmogul-node/common.d.ts +++ b/types/chartmogul-node/common.d.ts @@ -2,9 +2,10 @@ export interface Map { [key: string]: any; } export interface CursorParams { - page?: number; - per_page?: number; cursor?: string; + per_page?: number; + /** @deprecated Use cursor-based pagination instead */ + page?: number; } export type Strings = string[]; diff --git a/types/chartmogul-node/index.d.ts b/types/chartmogul-node/index.d.ts index 340a2866226450..d57ca32be4dd9d 100644 --- a/types/chartmogul-node/index.d.ts +++ b/types/chartmogul-node/index.d.ts @@ -4,6 +4,12 @@ export interface ResourceDestroyed { message: string; } +/** Query params used to identify a resource by data_source_uuid + external_id */ +export interface ExternalIdParams { + data_source_uuid: string; + external_id: string; +} + export class Config { VERSION: string; API_BASE: string; @@ -113,6 +119,102 @@ export namespace DataSource { function all(config: Config, params?: ListDataSourcesParams): Promise; } +export namespace JsonImport { + interface JsonImportStatus { + id?: string; + data_source_uuid: string; + status: "queued" | "processing" | "completed" | "failed" | (string & {}); + external_id: string; + status_details: Record; + created_at?: string; + updated_at?: string; + } + + interface BulkCustomer { + external_id: string; + name?: string; + email?: string; + company?: string; + country?: string; + state?: string; + city?: string; + zip?: string; + lead_created_at?: string; + free_trial_started_at?: string; + [key: string]: any; + } + + interface BulkPlan { + name: string; + interval_count: number; + interval_unit: "day" | "month" | "year"; + external_id?: string; + [key: string]: any; + } + + interface BulkInvoice { + customer_external_id: string; + external_id: string; + date: string; + due_date?: string; + currency?: string; + collection_method?: "automatic" | "manual"; + [key: string]: any; + } + + interface BulkLineItem { + invoice_external_id: string; + type: "subscription" | "one_time" | "trial"; + amount_in_cents: number; + external_id?: string; + subscription_external_id?: string; + plan_external_id?: string; + service_period_start?: string; + service_period_end?: string; + quantity?: number; + [key: string]: any; + } + + interface BulkTransaction { + invoice_external_id: string; + type: "payment" | "refund"; + result: "successful" | "failed"; + date: string; + external_id?: string; + amount_in_cents?: number; + [key: string]: any; + } + + interface BulkSubscriptionEvent { + customer_external_id: string; + event_type: string; + event_date: string; + effective_date: string; + subscription_external_id: string; + plan_external_id?: string; + currency?: string; + amount_in_cents?: number; + quantity?: number; + external_id?: string; + [key: string]: any; + } + + interface NewJsonImport { + external_id: string; + customers?: BulkCustomer[]; + plans?: BulkPlan[]; + invoices?: BulkInvoice[]; + line_items?: BulkLineItem[]; + transactions?: BulkTransaction[]; + subscription_events?: BulkSubscriptionEvent[]; + } + + /** POST /v1/data_sources/{dataSourceUuid}/json_imports — import data in bulk */ + function create(config: Config, dataSourceUuid: string, data: NewJsonImport): Promise; + /** GET /v1/data_sources/{dataSourceUuid}/json_imports/{importId} — track import status */ + function retrieve(config: Config, dataSourceUuid: string, importId: string): Promise; +} + export namespace Customer { interface Customer { id?: number; @@ -576,28 +678,53 @@ export namespace Invoice { date?: string; due_date?: string; external_id?: string; + customer_external_id?: string; + collection_method?: "automatic" | "manual" | null; + status?: string; + disabled?: boolean; + disabled_at?: string | null; + disabled_by?: string | null; + user_created?: boolean; + errors?: Record | null; + edit_history_summary?: { + values_changed?: Record; + latest_edit_author?: string; + latest_edit_performed_at?: string; + } | null; line_items?: LineItem[]; transactions?: Transaction[]; } interface LineItem { uuid?: string; - account_code?: string; + external_id?: string; + type?: string; amount_in_cents?: number; - cancelled_at?: string; - description?: string; - discount_amount_in_cents?: number; + quantity?: number; discount_code?: string; - external_id?: string; + discount_amount_in_cents?: number; + tax_amount_in_cents?: number; + transaction_fees_in_cents?: number; + account_code?: string; plan_uuid?: string; - prorated?: boolean; - quantity?: number; - service_period_end?: string; + plan_external_id?: string; service_period_start?: string; - subscription_external_id?: string; + service_period_end?: string; subscription_uuid?: string; - tax_amount_in_cents?: number; - transaction_fees_in_cents?: number; - type?: string; + subscription_external_id?: string; + subscription_set_external_id?: string; + prorated?: boolean; + proration_type?: string; + description?: string; + cancelled_at?: string; + event_order?: number; + balance_transfer?: boolean; + transaction_fees_currency?: string | null; + discount_description?: string | null; + disabled?: boolean; + disabled_at?: string | null; + disabled_by?: string | null; + user_created?: boolean; + error?: string | null; } interface Transaction { uuid?: string; @@ -605,6 +732,14 @@ export namespace Invoice { external_id?: string; result?: string; type?: string; + amount_in_cents?: number | null; + transaction_fees_in_cents?: number | null; + transaction_fees_currency?: string | null; + disabled?: boolean; + disabled_at?: string | null; + disabled_by?: string | null; + user_created?: boolean; + error?: string | null; } interface NewLineItemBase { @@ -703,8 +838,116 @@ export namespace Invoice { function retrieve(config: Config, uuid: string, params?: RetrieveInvoiceParams): Promise; function modify(config: Config, uuid: string, data: UpdateInvoice): Promise; function destroy(config: Config, uuid: string): Promise; + function destroyAll(config: Config, dataSourceUuid: string, customerUuid: string): Promise; + /** @deprecated Use destroyAll instead */ + function destroy_all(config: Config, dataSourceUuid: string, customerUuid: string): Promise; function all(config: Config, uuid: string, params?: ListInvoicesParams): Promise; function all(config: Config, params?: ListInvoicesParams): Promise; + + interface UpdateStatusResponse { + message: string; + } + /** Update invoice status. Expects data_source_uuid and invoice external_id as path params. */ + function updateStatus( + config: Config, + dataSourceUuid: string, + invoiceExternalId: string, + data: { status: "voided" | "written_off" }, + ): Promise; + interface DisableInvoiceParams { + reason?: string; + [key: string]: any; + } + /** Disable an invoice via PATCH /v1/invoices/:uuid/disabled_state */ + function disable(config: Config, uuid: string, data?: DisableInvoiceParams): Promise; + /** Re-enable a disabled invoice via PATCH /v1/invoices/:uuid/disabled_state */ + function enable(config: Config, uuid: string): Promise; + + /** PATCH /v1/invoices?data_source_uuid&external_id with body — use { qs: {...}, ...body } */ + function update(config: Config, data: { qs: ExternalIdParams } & UpdateInvoice): Promise; + /** DELETE /v1/invoices?data_source_uuid&external_id */ + function destroyByExternalId(config: Config, data: { qs: ExternalIdParams }): Promise; + /** Disable by query params: PATCH /v1/invoices/disabled_state?data_source_uuid&external_id */ + function disableByExternalId(config: Config, params: ExternalIdParams): Promise; + /** Enable by query params: PATCH /v1/invoices/disabled_state?data_source_uuid&external_id */ + function enableByExternalId(config: Config, params: ExternalIdParams): Promise; +} + +export namespace LineItem { + interface LineItem { + uuid?: string; + external_id?: string; + type?: string; + amount_in_cents?: number; + quantity?: number; + discount_code?: string; + discount_amount_in_cents?: number; + tax_amount_in_cents?: number; + transaction_fees_in_cents?: number; + account_code?: string; + plan_uuid?: string; + plan_external_id?: string; + service_period_start?: string; + service_period_end?: string; + subscription_uuid?: string; + subscription_external_id?: string; + subscription_set_external_id?: string; + prorated?: boolean; + proration_type?: string; + description?: string; + event_order?: number; + balance_transfer?: boolean; + transaction_fees_currency?: string | null; + discount_description?: string | null; + disabled?: boolean; + disabled_at?: string | null; + disabled_by?: string | null; + user_created?: boolean; + error?: string | null; + } + interface LineItems { + line_items: LineItem[]; + } + interface UpdateLineItem { + amount_in_cents?: number; + quantity?: number; + plan_uuid?: string; + service_period_start?: string; + service_period_end?: string; + description?: string; + discount_amount_in_cents?: number; + discount_code?: string; + tax_amount_in_cents?: number; + transaction_fees_in_cents?: number; + event_order?: number; + } + + /** POST /v1/import/invoices/:invoiceUuid/line_items */ + function create(config: Config, invoiceUuid: string, data: Invoice.NewLineItem): Promise; + /** GET /v1/line_items/:lineItemUuid */ + function retrieve(config: Config, lineItemUuid: string): Promise; + /** PATCH /v1/line_items/:lineItemUuid */ + function modify(config: Config, lineItemUuid: string, data: UpdateLineItem): Promise; + /** GET /v1/line_items?data_source_uuid&external_id */ + function all(config: Config, params: ExternalIdParams): Promise; + /** PATCH /v1/line_items?data_source_uuid&external_id with body */ + function update(config: Config, data: { qs: ExternalIdParams } & UpdateLineItem): Promise; + /** DELETE /v1/line_items/:lineItemUuid */ + function destroy(config: Config, lineItemUuid: string): Promise; + /** DELETE /v1/line_items?data_source_uuid&external_id */ + function destroyByExternalId(config: Config, data: { qs: ExternalIdParams }): Promise; + /** Disable: PATCH /v1/line_items/:lineItemUuid/disabled_state */ + function disable(config: Config, lineItemUuid: string): Promise; + /** Disable: PATCH /v1/line_items/disabled_state?data_source_uuid&external_id */ + function disable(config: Config, params: ExternalIdParams): Promise; + /** Enable: PATCH /v1/line_items/:lineItemUuid/disabled_state */ + function enable(config: Config, lineItemUuid: string): Promise; + /** Enable: PATCH /v1/line_items/disabled_state?data_source_uuid&external_id */ + function enable(config: Config, params: ExternalIdParams): Promise; + /** Disable by query params: PATCH /v1/line_items/disabled_state?data_source_uuid&external_id */ + function disableByExternalId(config: Config, params: ExternalIdParams): Promise; + /** Enable by query params: PATCH /v1/line_items/disabled_state?data_source_uuid&external_id */ + function enableByExternalId(config: Config, params: ExternalIdParams): Promise; } export namespace Transaction { @@ -721,6 +964,7 @@ export namespace Transaction { disabled_at?: string | null; disabled_by?: string | null; user_created?: boolean; + error?: string | null; } interface NewTransaction { @@ -733,7 +977,41 @@ export namespace Transaction { transaction_fees_currency?: string; } + interface Transactions { + transactions: Transaction[]; + } + interface UpdateTransaction { + type?: "payment" | "refund"; + date?: string; + result?: "successful" | "failed"; + amount_in_cents?: number; + } + function create(config: Config, invoiceUuid: string, data: NewTransaction): Promise; + /** GET /v1/transactions/:transactionUuid */ + function retrieve(config: Config, transactionUuid: string): Promise; + /** PATCH /v1/transactions/:transactionUuid */ + function modify(config: Config, transactionUuid: string, data: UpdateTransaction): Promise; + /** GET /v1/transactions?data_source_uuid&external_id */ + function all(config: Config, params: ExternalIdParams): Promise; + /** PATCH /v1/transactions?data_source_uuid&external_id with body */ + function update(config: Config, data: { qs: ExternalIdParams } & UpdateTransaction): Promise; + /** DELETE /v1/transactions/:transactionUuid */ + function destroy(config: Config, transactionUuid: string): Promise; + /** DELETE /v1/transactions?data_source_uuid&external_id */ + function destroyByExternalId(config: Config, data: { qs: ExternalIdParams }): Promise; + /** Disable: PATCH /v1/transactions/:transactionUuid/disabled_state */ + function disable(config: Config, transactionUuid: string): Promise; + /** Disable: PATCH /v1/transactions/disabled_state?data_source_uuid&external_id */ + function disable(config: Config, params: ExternalIdParams): Promise; + /** Enable: PATCH /v1/transactions/:transactionUuid/disabled_state */ + function enable(config: Config, transactionUuid: string): Promise; + /** Enable: PATCH /v1/transactions/disabled_state?data_source_uuid&external_id */ + function enable(config: Config, params: ExternalIdParams): Promise; + /** Disable by query params: PATCH /v1/transactions/disabled_state?data_source_uuid&external_id */ + function disableByExternalId(config: Config, params: ExternalIdParams): Promise; + /** Enable by query params: PATCH /v1/transactions/disabled_state?data_source_uuid&external_id */ + function enableByExternalId(config: Config, params: ExternalIdParams): Promise; } export namespace Subscription { @@ -791,6 +1069,11 @@ export namespace SubscriptionEvent { tax_amount_in_cents?: number; event_order?: number | null; retracted_event_id?: string | null; + invoice_external_id?: string | null; + disabled?: boolean; + disabled_at?: string | null; + disabled_by?: string | null; + user_created?: boolean; } interface NewSubscriptionEvent { @@ -853,21 +1136,31 @@ export namespace SubscriptionEvent { id?: number; } - function create(config: Config, data: { subscription_event: NewSubscriptionEvent }): Promise; + /** Create — accepts flat params (auto-wrapped) or envelope style */ + function create( + config: Config, + data: NewSubscriptionEvent | { subscription_event: NewSubscriptionEvent }, + ): Promise; function all(config: Config, params?: ListSubscriptionEventsParams): Promise; function modify(config: Config, data: { subscription_event: UpdateSubscriptionEvent }): Promise; + /** Update — accepts flat params (auto-wrapped) or envelope style */ function updateWithParams( config: Config, - data: { subscription_event: UpdateSubscriptionEvent }, + data: UpdateSubscriptionEvent | { subscription_event: UpdateSubscriptionEvent }, ): Promise; function destroy( config: Config, data: { subscription_event: DestroySubscriptionEvent }, ): Promise; + /** Delete — accepts flat params (auto-wrapped) or envelope style */ function deleteWithParams( config: Config, - data: { subscription_event: DestroySubscriptionEvent }, + data: DestroySubscriptionEvent | { subscription_event: DestroySubscriptionEvent }, ): Promise; + /** Disable a subscription event via PATCH /v1/subscription_events/:id/disabled_state */ + function disable(config: Config, id: number | string): Promise; + /** Re-enable a disabled subscription event */ + function enable(config: Config, id: number | string): Promise; } export namespace Tag { diff --git a/types/chartmogul-node/package.json b/types/chartmogul-node/package.json index 55baa19cb6be36..437efd25f172f3 100644 --- a/types/chartmogul-node/package.json +++ b/types/chartmogul-node/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/chartmogul-node", - "version": "3.9.9999", + "version": "3.12.9999", "projects": [ "https://github.com/chartmogul/chartmogul-node" ], diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 132be1435cd152..261d8526edae21 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -9298,7 +9298,8 @@ declare namespace Office { */ interface OnReadyOptions { /** - * Enables the behavior that allows the `onReady` promise to be rejected. + * Enables the behavior that allows the `onReady` promise to be rejected if failures are encountered. + * If not passed, then the `onReady` promise won't reject. */ setRejectionEnabled?: () => void; }