@outseta/react 0.5.3 → 0.5.5
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/dist/index.js
CHANGED
|
@@ -4834,6 +4834,7 @@ var QcountConfigSettingType = {
|
|
|
4834
4834
|
MagicLinkLoginEnabled: 143,
|
|
4835
4835
|
Support_DeleteClosedTicketsAfterMonths: 148,
|
|
4836
4836
|
SingleSessionLogin: 149,
|
|
4837
|
+
CRM_PasswordChangedEmailDisabled: 152,
|
|
4837
4838
|
GoogleAnalyticsMeasurementId: 170,
|
|
4838
4839
|
GoogleAnalyticsApiSecret: 171,
|
|
4839
4840
|
Stripe_TaxEnabled: 190,
|
|
@@ -4928,6 +4929,7 @@ var ActivityType = {
|
|
|
4928
4929
|
PlanUpdated: 401,
|
|
4929
4930
|
AddOnCreated: 402,
|
|
4930
4931
|
AddOnUpdated: 403,
|
|
4932
|
+
TransactionalEmailSettingUpdated: 404,
|
|
4931
4933
|
DiscordUserLinked: 500,
|
|
4932
4934
|
DiscordUserAddedToServer: 501,
|
|
4933
4935
|
DiscordUserRolesUpdated: 502,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outseta/react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "React hooks and components for the Outseta API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@outseta/api-client": "0.4.
|
|
21
|
+
"@outseta/api-client": "0.4.5"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "^18.0.0 || ^19.0.0"
|
package/src/generated/crm/crm.ts
CHANGED
|
@@ -1583,7 +1583,8 @@ export const useAccountExtendRenewal = <TError = void,
|
|
|
1583
1583
|
/**
|
|
1584
1584
|
* Pass personUid as a query parameter to send to a specific person, or personUid=* to send
|
|
1585
1585
|
to all people on the account. If no personUid is provided, the email is sent to the
|
|
1586
|
-
primary contact.
|
|
1586
|
+
primary contact. The email is sent even when the Registration confirmation email is
|
|
1587
|
+
turned off under Email > Transactional emails.
|
|
1587
1588
|
* @summary Send a confirmation email to people on an account.
|
|
1588
1589
|
*/
|
|
1589
1590
|
export const accountSendConfirmationEmail = (
|
|
@@ -1820,6 +1820,8 @@ export type StripeInvoiceLineItemAllOf = {
|
|
|
1820
1820
|
* @nullable
|
|
1821
1821
|
*/
|
|
1822
1822
|
Currency?: string | null;
|
|
1823
|
+
/** @nullable */
|
|
1824
|
+
Description?: string | null;
|
|
1823
1825
|
PeriodStart?: string;
|
|
1824
1826
|
PeriodEnd?: string;
|
|
1825
1827
|
/** @nullable */
|
|
@@ -1830,6 +1832,11 @@ export type StripeInvoiceLineItemAllOf = {
|
|
|
1830
1832
|
StripePrice?: StripeInvoiceLineItemAllOfStripePrice;
|
|
1831
1833
|
/** @nullable */
|
|
1832
1834
|
EndDate?: string | null;
|
|
1835
|
+
/**
|
|
1836
|
+
* @maxLength 20
|
|
1837
|
+
* @nullable
|
|
1838
|
+
*/
|
|
1839
|
+
LineType?: string | null;
|
|
1833
1840
|
/** @nullable */
|
|
1834
1841
|
CurrencyAmount?: number | null;
|
|
1835
1842
|
/** @nullable */
|
|
@@ -3497,7 +3504,7 @@ export type QcountConfigAllOf = {
|
|
|
3497
3504
|
export type QcountConfig = AbstractQcountBean & QcountConfigAllOf;
|
|
3498
3505
|
|
|
3499
3506
|
/**
|
|
3500
|
-
* `100` - Slack, `102` - MagicLinkApiKey, `103` - MagicLinkApiKeySecret, `104` - OAuth_HideCreateAccountLink, `105` - Chat_IsOffline, `106` - HostedPageCustomCode, `107` - RegistrationConfirmationEmailDelaySeconds, `108` - AccountCancellationReasons, `110` - WebhookSignatureKey, `111` - HostedProfileBackLink, `112` - AccountCancellationReasonRequired, `114` - Email_OutsetaBrandingDisabled, `119` - Email_BlacklistedInboundEmails, `121` - PasswordPolicy, `123` - CRM_FieldSortingEnabled, `124` - CRM_RegistrationCallbackLocations, `125` - KnowledgeBaseVersion, `126` - Support_SpamThreshold, `127` - Email_RestrictedPhrases, `128` - KnowledgeBaseLanguage, `130` - Billing_System, `131` - Billing_RestrictSubscriptionActions, `140` - TwoFactorAuthenticationEnabled, `142` - ForceTwoFactorAuthentication, `143` - MagicLinkLoginEnabled, `148` - Support_DeleteClosedTicketsAfterMonths, `149` - SingleSessionLogin, `170` - GoogleAnalyticsMeasurementId, `171` - GoogleAnalyticsApiSecret, `190` - Stripe_TaxEnabled, `192` - Stripe_TaxIdTypes, `193` - Stripe_ApplePayMerchantIdDomainAssociation, `194` - Stripe_WebhookSecret, `195` - Stripe_OnlySyncOutsetaCustomers, `196` - Stripe_Checkout_RequireBillingAddress, `197` - Stripe_Checkout_RequireConsentTermsOfService, `200` - Webflow_AccessToken, `201` - Webflow_SyncEnabled, `202` - Webflow_SyncConfiguration, `203` - Webflow_ApiVersion, `550` - CopyQcount_AddOnMap, `551` - CopyQcount_AccountMap, `552` - CopyQcount_DiscountCouponMap, `553` - CopyQcount_InvoiceMap, `554` - CopyQcount_PersonMap, `555` - CopyQcount_PlanMap, `556` - CopyQcount_PlanFamilyMap, `557` - CopyQcount_SubscriptionMap, `558` - CopyQcount_TransactionMap, `570` - StripeMigration_LastAccountId, `571` - StripeMigration_LastInvoiceId, `572` - StripeMigration_LastExpiredSubscriptionId, `573` - StripeMigration_LastPostExportSubscriptionId, `574` - StripeMigration_LastUsageId, `575` - StripeMigration_SubscriptionExportDate, `576` - StripeMigration_SubscriptionExportIds, `577` - StripeMigration_SubscriptionAddOnExportIds, `578` - StripeMigration_SubscriptionCutoverDate, `579` - StripeMigration_LastPreCutoverExportSubscriptionId
|
|
3507
|
+
* `100` - Slack, `102` - MagicLinkApiKey, `103` - MagicLinkApiKeySecret, `104` - OAuth_HideCreateAccountLink, `105` - Chat_IsOffline, `106` - HostedPageCustomCode, `107` - RegistrationConfirmationEmailDelaySeconds, `108` - AccountCancellationReasons, `110` - WebhookSignatureKey, `111` - HostedProfileBackLink, `112` - AccountCancellationReasonRequired, `114` - Email_OutsetaBrandingDisabled, `119` - Email_BlacklistedInboundEmails, `121` - PasswordPolicy, `123` - CRM_FieldSortingEnabled, `124` - CRM_RegistrationCallbackLocations, `125` - KnowledgeBaseVersion, `126` - Support_SpamThreshold, `127` - Email_RestrictedPhrases, `128` - KnowledgeBaseLanguage, `130` - Billing_System, `131` - Billing_RestrictSubscriptionActions, `140` - TwoFactorAuthenticationEnabled, `142` - ForceTwoFactorAuthentication, `143` - MagicLinkLoginEnabled, `148` - Support_DeleteClosedTicketsAfterMonths, `149` - SingleSessionLogin, `152` - CRM_PasswordChangedEmailDisabled, `170` - GoogleAnalyticsMeasurementId, `171` - GoogleAnalyticsApiSecret, `190` - Stripe_TaxEnabled, `192` - Stripe_TaxIdTypes, `193` - Stripe_ApplePayMerchantIdDomainAssociation, `194` - Stripe_WebhookSecret, `195` - Stripe_OnlySyncOutsetaCustomers, `196` - Stripe_Checkout_RequireBillingAddress, `197` - Stripe_Checkout_RequireConsentTermsOfService, `200` - Webflow_AccessToken, `201` - Webflow_SyncEnabled, `202` - Webflow_SyncConfiguration, `203` - Webflow_ApiVersion, `550` - CopyQcount_AddOnMap, `551` - CopyQcount_AccountMap, `552` - CopyQcount_DiscountCouponMap, `553` - CopyQcount_InvoiceMap, `554` - CopyQcount_PersonMap, `555` - CopyQcount_PlanMap, `556` - CopyQcount_PlanFamilyMap, `557` - CopyQcount_SubscriptionMap, `558` - CopyQcount_TransactionMap, `570` - StripeMigration_LastAccountId, `571` - StripeMigration_LastInvoiceId, `572` - StripeMigration_LastExpiredSubscriptionId, `573` - StripeMigration_LastPostExportSubscriptionId, `574` - StripeMigration_LastUsageId, `575` - StripeMigration_SubscriptionExportDate, `576` - StripeMigration_SubscriptionExportIds, `577` - StripeMigration_SubscriptionAddOnExportIds, `578` - StripeMigration_SubscriptionCutoverDate, `579` - StripeMigration_LastPreCutoverExportSubscriptionId
|
|
3501
3508
|
*/
|
|
3502
3509
|
export type QcountConfigSettingType = typeof QcountConfigSettingType[keyof typeof QcountConfigSettingType];
|
|
3503
3510
|
|
|
@@ -3531,6 +3538,7 @@ export const QcountConfigSettingType = {
|
|
|
3531
3538
|
MagicLinkLoginEnabled: 143,
|
|
3532
3539
|
Support_DeleteClosedTicketsAfterMonths: 148,
|
|
3533
3540
|
SingleSessionLogin: 149,
|
|
3541
|
+
CRM_PasswordChangedEmailDisabled: 152,
|
|
3534
3542
|
GoogleAnalyticsMeasurementId: 170,
|
|
3535
3543
|
GoogleAnalyticsApiSecret: 171,
|
|
3536
3544
|
Stripe_TaxEnabled: 190,
|
|
@@ -3682,7 +3690,7 @@ export interface SlackChannelSetting {
|
|
|
3682
3690
|
}
|
|
3683
3691
|
|
|
3684
3692
|
/**
|
|
3685
|
-
* `10` - Custom, `50` - Note, `51` - Email, `52` - PhoneCall, `53` - Meeting, `54` - Chat, `100` - AccountCreated, `101` - AccountUpdated, `102` - AccountAddPerson, `103` - AccountStageUpdated, `104` - AccountDeleted, `105` - AccountBillingInformationUpdated, `106` - AccountSubscriptionPlanUpdated, `107` - AccountSubscriptionPaymentCollected, `108` - AccountSubscriptionPaymentDeclined, `109` - AccountBillingInformationRequested, `110` - AccountBillingInvoiceEmailSent, `111` - AccountRemovePerson, `112` - AccountPaidSubscriptionCreated, `113` - AccountBillingInformationRemoved, `114` - AccountPrimaryPersonUpdated, `115` - AccountBillingInvoiceCreated, `116` - AccountSubscriptionStarted, `117` - AccountSubscriptionRenewalExtended, `118` - AccountSubscriptionAddOnsChanged, `119` - AccountSubscriptionCancellationRequested, `120` - AccountBillingInvoiceDeleted, `121` - AccountPersonRoleUpdated, `122` - AccountProductsChanged, `200` - PersonCreated, `201` - PersonUpdated, `202` - PersonDeleted, `203` - PersonLogin, `204` - PersonListSubscribed, `205` - PersonListUnsubscribed, `206` - PersonSegmentAdded, `207` - PersonSegmentRemoved, `208` - PersonEmailOpened, `209` - PersonEmailClicked, `210` - PersonEmailBounce, `211` - PersonEmailSpam, `212` - PersonSupportTicketCreated, `213` - PersonSupportTicketUpdated, `214` - PersonLeadFormSubmitted, `215` - PersonListConfirmed, `216` - PersonEmailSubscribed, `217` - PersonEmailUnsubscribed, `218` - PersonTemporaryPasswordSet, `219` - PersonSupportTicketClosed, `220` - PersonTwoFactorRecoveryCodesRegenerated, `300` - DealCreated, `301` - DealUpdated, `304` - DealDeleted, `305` - DealDueDate, `306` - TaskCreated, `307` - TaskUpdated, `400` - PlanCreated, `401` - PlanUpdated, `402` - AddOnCreated, `403` - AddOnUpdated, `500` - DiscordUserLinked, `501` - DiscordUserAddedToServer, `502` - DiscordUserRolesUpdated, `503` - DiscordUserRemovedFromServer
|
|
3693
|
+
* `10` - Custom, `50` - Note, `51` - Email, `52` - PhoneCall, `53` - Meeting, `54` - Chat, `100` - AccountCreated, `101` - AccountUpdated, `102` - AccountAddPerson, `103` - AccountStageUpdated, `104` - AccountDeleted, `105` - AccountBillingInformationUpdated, `106` - AccountSubscriptionPlanUpdated, `107` - AccountSubscriptionPaymentCollected, `108` - AccountSubscriptionPaymentDeclined, `109` - AccountBillingInformationRequested, `110` - AccountBillingInvoiceEmailSent, `111` - AccountRemovePerson, `112` - AccountPaidSubscriptionCreated, `113` - AccountBillingInformationRemoved, `114` - AccountPrimaryPersonUpdated, `115` - AccountBillingInvoiceCreated, `116` - AccountSubscriptionStarted, `117` - AccountSubscriptionRenewalExtended, `118` - AccountSubscriptionAddOnsChanged, `119` - AccountSubscriptionCancellationRequested, `120` - AccountBillingInvoiceDeleted, `121` - AccountPersonRoleUpdated, `122` - AccountProductsChanged, `200` - PersonCreated, `201` - PersonUpdated, `202` - PersonDeleted, `203` - PersonLogin, `204` - PersonListSubscribed, `205` - PersonListUnsubscribed, `206` - PersonSegmentAdded, `207` - PersonSegmentRemoved, `208` - PersonEmailOpened, `209` - PersonEmailClicked, `210` - PersonEmailBounce, `211` - PersonEmailSpam, `212` - PersonSupportTicketCreated, `213` - PersonSupportTicketUpdated, `214` - PersonLeadFormSubmitted, `215` - PersonListConfirmed, `216` - PersonEmailSubscribed, `217` - PersonEmailUnsubscribed, `218` - PersonTemporaryPasswordSet, `219` - PersonSupportTicketClosed, `220` - PersonTwoFactorRecoveryCodesRegenerated, `300` - DealCreated, `301` - DealUpdated, `304` - DealDeleted, `305` - DealDueDate, `306` - TaskCreated, `307` - TaskUpdated, `400` - PlanCreated, `401` - PlanUpdated, `402` - AddOnCreated, `403` - AddOnUpdated, `404` - TransactionalEmailSettingUpdated, `500` - DiscordUserLinked, `501` - DiscordUserAddedToServer, `502` - DiscordUserRolesUpdated, `503` - DiscordUserRemovedFromServer
|
|
3686
3694
|
*/
|
|
3687
3695
|
export type ActivityType = typeof ActivityType[keyof typeof ActivityType];
|
|
3688
3696
|
|
|
@@ -3749,6 +3757,7 @@ export const ActivityType = {
|
|
|
3749
3757
|
PlanUpdated: 401,
|
|
3750
3758
|
AddOnCreated: 402,
|
|
3751
3759
|
AddOnUpdated: 403,
|
|
3760
|
+
TransactionalEmailSettingUpdated: 404,
|
|
3752
3761
|
DiscordUserLinked: 500,
|
|
3753
3762
|
DiscordUserAddedToServer: 501,
|
|
3754
3763
|
DiscordUserRolesUpdated: 502,
|
|
@@ -3847,6 +3856,29 @@ export type TemplateEmailInstanceAllOf = {
|
|
|
3847
3856
|
|
|
3848
3857
|
export type TemplateEmailInstance = AbstractQcountBean & TemplateEmailInstanceAllOf;
|
|
3849
3858
|
|
|
3859
|
+
export interface TransactionalEmailSetting {
|
|
3860
|
+
/** @nullable */
|
|
3861
|
+
Key?: string | null;
|
|
3862
|
+
/** @nullable */
|
|
3863
|
+
Name?: string | null;
|
|
3864
|
+
/** @nullable */
|
|
3865
|
+
SentWhen?: string | null;
|
|
3866
|
+
/** @nullable */
|
|
3867
|
+
TemplateSystemNames?: string[] | null;
|
|
3868
|
+
IsEnabled?: boolean;
|
|
3869
|
+
}
|
|
3870
|
+
|
|
3871
|
+
export interface TransactionalEmailSettingUpdateRequest {
|
|
3872
|
+
/** @nullable */
|
|
3873
|
+
Settings?: TransactionalEmailSettingUpdate[] | null;
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3876
|
+
export interface TransactionalEmailSettingUpdate {
|
|
3877
|
+
/** @nullable */
|
|
3878
|
+
Key?: string | null;
|
|
3879
|
+
IsEnabled?: boolean;
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3850
3882
|
/**
|
|
3851
3883
|
* The fields of an email template that an update may change. Every field is optional:
|
|
3852
3884
|
a field left out keeps its current value.
|
|
@@ -5093,6 +5125,9 @@ export interface ExtendSubscriptionOptions {
|
|
|
5093
5125
|
export type BillSettingsAllOf = {
|
|
5094
5126
|
DaysPastDueToSetAccountToCanceling?: number;
|
|
5095
5127
|
IsInvoicePaymentEmailDisabled: boolean;
|
|
5128
|
+
IsInvoiceReminderEmailDisabled: boolean;
|
|
5129
|
+
IsPaymentProblemEmailDisabled: boolean;
|
|
5130
|
+
IsPaymentInfoUpdatedEmailDisabled: boolean;
|
|
5096
5131
|
PaymentsMode?: PaymentsMode;
|
|
5097
5132
|
BillingSystem?: BillingSystem;
|
|
5098
5133
|
RestrictSubscriptionActions?: boolean;
|
|
@@ -9891,6 +9926,32 @@ export type TemplateGetAllTemplateEmails200 = {
|
|
|
9891
9926
|
items?: TemplateEmailInstance[];
|
|
9892
9927
|
};
|
|
9893
9928
|
|
|
9929
|
+
export type TemplateGetTransactionalEmailSettingsParams = {
|
|
9930
|
+
/**
|
|
9931
|
+
* Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
|
|
9932
|
+
*/
|
|
9933
|
+
limit?: LimitParameter;
|
|
9934
|
+
/**
|
|
9935
|
+
* Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
|
|
9936
|
+
*/
|
|
9937
|
+
offset?: OffsetParameter;
|
|
9938
|
+
};
|
|
9939
|
+
|
|
9940
|
+
export type TemplateGetTransactionalEmailSettings200 = {
|
|
9941
|
+
metadata?: CollectionMetadata;
|
|
9942
|
+
items?: TransactionalEmailSetting[];
|
|
9943
|
+
};
|
|
9944
|
+
|
|
9945
|
+
/**
|
|
9946
|
+
* @nullable
|
|
9947
|
+
*/
|
|
9948
|
+
export type TemplateUpdateTransactionalEmailSettingsBody = TransactionalEmailSettingUpdateRequest | null;
|
|
9949
|
+
|
|
9950
|
+
export type TemplateUpdateTransactionalEmailSettings200 = {
|
|
9951
|
+
metadata?: CollectionMetadata;
|
|
9952
|
+
items?: TransactionalEmailSetting[];
|
|
9953
|
+
};
|
|
9954
|
+
|
|
9894
9955
|
export type TemplateGetTemplateEmailsParams = {
|
|
9895
9956
|
/**
|
|
9896
9957
|
* Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
|
|
@@ -22,7 +22,11 @@ import type {
|
|
|
22
22
|
TemplateGetAllTemplatesParams,
|
|
23
23
|
TemplateGetTemplateEmails200,
|
|
24
24
|
TemplateGetTemplateEmailsParams,
|
|
25
|
+
TemplateGetTransactionalEmailSettings200,
|
|
26
|
+
TemplateGetTransactionalEmailSettingsParams,
|
|
25
27
|
TemplateSendTemplateEmailBody,
|
|
28
|
+
TemplateUpdateTransactionalEmailSettings200,
|
|
29
|
+
TemplateUpdateTransactionalEmailSettingsBody,
|
|
26
30
|
UpdateTemplateRequest
|
|
27
31
|
} from '../outsetaAPI.schemas';
|
|
28
32
|
|
|
@@ -190,6 +194,144 @@ export function useTemplateGetAllTemplateEmails<TData = Awaited<ReturnType<typeo
|
|
|
190
194
|
|
|
191
195
|
|
|
192
196
|
/**
|
|
197
|
+
* Each setting names the email templates it covers. A setting that is off stops the
|
|
198
|
+
automatic email only; an email sent by hand, such as the send invoice button, is
|
|
199
|
+
still sent.
|
|
200
|
+
* @summary The on/off settings for the transactional emails that Outseta sends to your customers.
|
|
201
|
+
*/
|
|
202
|
+
export const templateGetTransactionalEmailSettings = (
|
|
203
|
+
params?: TemplateGetTransactionalEmailSettingsParams,
|
|
204
|
+
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
|
205
|
+
) => {
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
return customFetch<TemplateGetTransactionalEmailSettings200>(
|
|
209
|
+
{url: `/api/v1/templates/transactional-email-settings`, method: 'GET',
|
|
210
|
+
params, signal
|
|
211
|
+
},
|
|
212
|
+
options);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
export const getTemplateGetTransactionalEmailSettingsQueryKey = (params?: TemplateGetTransactionalEmailSettingsParams,) => {
|
|
219
|
+
return [
|
|
220
|
+
`/api/v1/templates/transactional-email-settings`, ...(params ? [params]: [])
|
|
221
|
+
] as const;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
export const getTemplateGetTransactionalEmailSettingsQueryOptions = <TData = Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>, TError = void>(params?: TemplateGetTransactionalEmailSettingsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>, TError, TData>, request?: SecondParameter<typeof customFetch>}
|
|
226
|
+
) => {
|
|
227
|
+
|
|
228
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
229
|
+
|
|
230
|
+
const queryKey = queryOptions?.queryKey ?? getTemplateGetTransactionalEmailSettingsQueryKey(params);
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>> = ({ signal }) => templateGetTransactionalEmailSettings(params, requestOptions, signal);
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>, TError, TData> & { queryKey: QueryKey }
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type TemplateGetTransactionalEmailSettingsQueryResult = NonNullable<Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>>
|
|
244
|
+
export type TemplateGetTransactionalEmailSettingsQueryError = void
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @summary The on/off settings for the transactional emails that Outseta sends to your customers.
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
export function useTemplateGetTransactionalEmailSettings<TData = Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>, TError = void>(
|
|
252
|
+
params?: TemplateGetTransactionalEmailSettingsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof templateGetTransactionalEmailSettings>>, TError, TData>, request?: SecondParameter<typeof customFetch>}
|
|
253
|
+
|
|
254
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
255
|
+
|
|
256
|
+
const queryOptions = getTemplateGetTransactionalEmailSettingsQueryOptions(params,options)
|
|
257
|
+
|
|
258
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
259
|
+
|
|
260
|
+
query.queryKey = queryOptions.queryKey ;
|
|
261
|
+
|
|
262
|
+
return query;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Send an object with a Settings list. Each item has Key and IsEnabled. A setting that
|
|
270
|
+
is not in the list keeps its state. Each change is recorded in the activity log.
|
|
271
|
+
Returns all settings.
|
|
272
|
+
* @summary Turns transactional emails on or off.
|
|
273
|
+
*/
|
|
274
|
+
export const templateUpdateTransactionalEmailSettings = (
|
|
275
|
+
templateUpdateTransactionalEmailSettingsBody: TemplateUpdateTransactionalEmailSettingsBody,
|
|
276
|
+
options?: SecondParameter<typeof customFetch>,) => {
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
return customFetch<TemplateUpdateTransactionalEmailSettings200>(
|
|
280
|
+
{url: `/api/v1/templates/transactional-email-settings`, method: 'PUT',
|
|
281
|
+
headers: {'Content-Type': 'application/json', },
|
|
282
|
+
data: templateUpdateTransactionalEmailSettingsBody
|
|
283
|
+
},
|
|
284
|
+
options);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
export const getTemplateUpdateTransactionalEmailSettingsMutationOptions = <TError = void,
|
|
290
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof templateUpdateTransactionalEmailSettings>>, TError,{data: TemplateUpdateTransactionalEmailSettingsBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
291
|
+
): UseMutationOptions<Awaited<ReturnType<typeof templateUpdateTransactionalEmailSettings>>, TError,{data: TemplateUpdateTransactionalEmailSettingsBody}, TContext> => {
|
|
292
|
+
|
|
293
|
+
const mutationKey = ['templateUpdateTransactionalEmailSettings'];
|
|
294
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
295
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
296
|
+
options
|
|
297
|
+
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
298
|
+
: {mutation: { mutationKey, }, request: undefined};
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof templateUpdateTransactionalEmailSettings>>, {data: TemplateUpdateTransactionalEmailSettingsBody}> = (props) => {
|
|
304
|
+
const {data} = props ?? {};
|
|
305
|
+
|
|
306
|
+
return templateUpdateTransactionalEmailSettings(data,requestOptions)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
return { mutationFn, ...mutationOptions }}
|
|
313
|
+
|
|
314
|
+
export type TemplateUpdateTransactionalEmailSettingsMutationResult = NonNullable<Awaited<ReturnType<typeof templateUpdateTransactionalEmailSettings>>>
|
|
315
|
+
export type TemplateUpdateTransactionalEmailSettingsMutationBody = TemplateUpdateTransactionalEmailSettingsBody
|
|
316
|
+
export type TemplateUpdateTransactionalEmailSettingsMutationError = void
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* @summary Turns transactional emails on or off.
|
|
320
|
+
*/
|
|
321
|
+
export const useTemplateUpdateTransactionalEmailSettings = <TError = void,
|
|
322
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof templateUpdateTransactionalEmailSettings>>, TError,{data: TemplateUpdateTransactionalEmailSettingsBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
323
|
+
): UseMutationResult<
|
|
324
|
+
Awaited<ReturnType<typeof templateUpdateTransactionalEmailSettings>>,
|
|
325
|
+
TError,
|
|
326
|
+
{data: TemplateUpdateTransactionalEmailSettingsBody},
|
|
327
|
+
TContext
|
|
328
|
+
> => {
|
|
329
|
+
|
|
330
|
+
const mutationOptions = getTemplateUpdateTransactionalEmailSettingsMutationOptions(options);
|
|
331
|
+
|
|
332
|
+
return useMutation(mutationOptions);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
193
335
|
* Add personUid to the query string to see what one person was sent from this
|
|
194
336
|
template.
|
|
195
337
|
* @summary The one-off emails that were sent from this email template.
|