@outseta/react 0.5.9 → 0.5.11

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
@@ -4018,6 +4018,26 @@ var useCampaignArchiveBroadcastCampaign = (options) => {
4018
4018
  const mutationOptions = getCampaignArchiveBroadcastCampaignMutationOptions(options);
4019
4019
  return useMutation(mutationOptions);
4020
4020
  };
4021
+ var campaignUnarchiveBroadcastCampaign = (broadcastCampaignUid, options, signal) => {
4022
+ return customFetch2({
4023
+ url: `/api/v1/email/campaigns/broadcasts/${broadcastCampaignUid}/unarchive`,
4024
+ method: "POST",
4025
+ signal
4026
+ }, options);
4027
+ };
4028
+ var getCampaignUnarchiveBroadcastCampaignMutationOptions = (options) => {
4029
+ const mutationKey = ["campaignUnarchiveBroadcastCampaign"];
4030
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
4031
+ const mutationFn = (props) => {
4032
+ const { broadcastCampaignUid } = props ?? {};
4033
+ return campaignUnarchiveBroadcastCampaign(broadcastCampaignUid, requestOptions);
4034
+ };
4035
+ return { mutationFn, ...mutationOptions };
4036
+ };
4037
+ var useCampaignUnarchiveBroadcastCampaign = (options) => {
4038
+ const mutationOptions = getCampaignUnarchiveBroadcastCampaignMutationOptions(options);
4039
+ return useMutation(mutationOptions);
4040
+ };
4021
4041
  var campaignSendTestCampaignEmail = (campaignSendTestCampaignEmailBody, options, signal) => {
4022
4042
  return customFetch2({
4023
4043
  url: `/api/v1/email/campaigns/broadcasts/sendtestemail`,
@@ -5378,6 +5398,7 @@ export {
5378
5398
  campaignRemoveTagFromEntity,
5379
5399
  campaignSendTestCampaignEmail,
5380
5400
  campaignSetTagsForEntity,
5401
+ campaignUnarchiveBroadcastCampaign,
5381
5402
  campaignUnscheduleBroadcastEmail,
5382
5403
  campaignUpdateBroadcastEmail,
5383
5404
  caseAddCase,
@@ -5461,6 +5482,7 @@ export {
5461
5482
  getCampaignRemoveTagFromEntityMutationOptions,
5462
5483
  getCampaignSendTestCampaignEmailMutationOptions,
5463
5484
  getCampaignSetTagsForEntityMutationOptions,
5485
+ getCampaignUnarchiveBroadcastCampaignMutationOptions,
5464
5486
  getCampaignUnscheduleBroadcastEmailMutationOptions,
5465
5487
  getCampaignUpdateBroadcastEmailMutationOptions,
5466
5488
  getCaseAddCaseMutationOptions,
@@ -5790,6 +5812,7 @@ export {
5790
5812
  useCampaignRemoveTagFromEntity,
5791
5813
  useCampaignSendTestCampaignEmail,
5792
5814
  useCampaignSetTagsForEntity,
5815
+ useCampaignUnarchiveBroadcastCampaign,
5793
5816
  useCampaignUnscheduleBroadcastEmail,
5794
5817
  useCampaignUpdateBroadcastEmail,
5795
5818
  useCaseAddCase,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outseta/react",
3
- "version": "0.5.9",
3
+ "version": "0.5.11",
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.9"
21
+ "@outseta/api-client": "0.4.11"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": "^18.0.0 || ^19.0.0"
@@ -754,7 +754,7 @@ export const useDripCampaignSendTestCampaignEmail = <TError = void,
754
754
  return useMutation(mutationOptions);
755
755
  }
756
756
  /**
757
- * Archived broadcasts are excluded.
757
+ * Archived broadcasts are excluded unless the Status filter asks for them (Status=10).
758
758
  * @summary Retrieve all broadcasts.
759
759
  */
760
760
  export const campaignGetAllBroadcastEmails = (
@@ -1269,6 +1269,70 @@ export const useCampaignArchiveBroadcastCampaign = <TError = void,
1269
1269
  return useMutation(mutationOptions);
1270
1270
  }
1271
1271
  /**
1272
+ * The broadcast's status becomes Sent if it sent any emails, and Draft otherwise.
1273
+ Unarchiving never resumes sending.
1274
+ * @summary Unarchive a broadcast.
1275
+ */
1276
+ export const campaignUnarchiveBroadcastCampaign = (
1277
+ broadcastCampaignUid: string | null,
1278
+ options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
1279
+ ) => {
1280
+
1281
+
1282
+ return customFetch<BroadcastCampaign>(
1283
+ {url: `/api/v1/email/campaigns/broadcasts/${broadcastCampaignUid}/unarchive`, method: 'POST', signal
1284
+ },
1285
+ options);
1286
+ }
1287
+
1288
+
1289
+
1290
+ export const getCampaignUnarchiveBroadcastCampaignMutationOptions = <TError = void,
1291
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignUnarchiveBroadcastCampaign>>, TError,{broadcastCampaignUid: string | null}, TContext>, request?: SecondParameter<typeof customFetch>}
1292
+ ): UseMutationOptions<Awaited<ReturnType<typeof campaignUnarchiveBroadcastCampaign>>, TError,{broadcastCampaignUid: string | null}, TContext> => {
1293
+
1294
+ const mutationKey = ['campaignUnarchiveBroadcastCampaign'];
1295
+ const {mutation: mutationOptions, request: requestOptions} = options ?
1296
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
1297
+ options
1298
+ : {...options, mutation: {...options.mutation, mutationKey}}
1299
+ : {mutation: { mutationKey, }, request: undefined};
1300
+
1301
+
1302
+
1303
+
1304
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof campaignUnarchiveBroadcastCampaign>>, {broadcastCampaignUid: string | null}> = (props) => {
1305
+ const {broadcastCampaignUid} = props ?? {};
1306
+
1307
+ return campaignUnarchiveBroadcastCampaign(broadcastCampaignUid,requestOptions)
1308
+ }
1309
+
1310
+
1311
+
1312
+
1313
+ return { mutationFn, ...mutationOptions }}
1314
+
1315
+ export type CampaignUnarchiveBroadcastCampaignMutationResult = NonNullable<Awaited<ReturnType<typeof campaignUnarchiveBroadcastCampaign>>>
1316
+
1317
+ export type CampaignUnarchiveBroadcastCampaignMutationError = void
1318
+
1319
+ /**
1320
+ * @summary Unarchive a broadcast.
1321
+ */
1322
+ export const useCampaignUnarchiveBroadcastCampaign = <TError = void,
1323
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignUnarchiveBroadcastCampaign>>, TError,{broadcastCampaignUid: string | null}, TContext>, request?: SecondParameter<typeof customFetch>}
1324
+ ): UseMutationResult<
1325
+ Awaited<ReturnType<typeof campaignUnarchiveBroadcastCampaign>>,
1326
+ TError,
1327
+ {broadcastCampaignUid: string | null},
1328
+ TContext
1329
+ > => {
1330
+
1331
+ const mutationOptions = getCampaignUnarchiveBroadcastCampaignMutationOptions(options);
1332
+
1333
+ return useMutation(mutationOptions);
1334
+ }
1335
+ /**
1272
1336
  * Sends to the logged-in user and optionally to additional recipients. Additional
1273
1337
  recipients are specified as a list of person Uids and must belong to the same account
1274
1338
  as the logged-in user.
@@ -1505,6 +1505,9 @@ export type StripeProductFamilyAllOf = {
1505
1505
  /** @nullable */
1506
1506
  BillingCycleAnchorMonth?: number | null;
1507
1507
  /** @nullable */
1508
+ ExpirationDate?: string | null;
1509
+ ExpiresAfterMonths?: number;
1510
+ /** @nullable */
1508
1511
  StripeProducts?: StripeProduct[] | null;
1509
1512
  [key: string]: unknown | null;
1510
1513
  };
@@ -1640,6 +1643,9 @@ export type StripeSubscriptionAllOf = {
1640
1643
  /** @nullable */
1641
1644
  Account?: StripeSubscriptionAllOfAccount;
1642
1645
  /** @nullable */
1646
+ ExpirationDate?: string | null;
1647
+ IsCancelling?: boolean;
1648
+ /** @nullable */
1643
1649
  AccountUid?: string | null;
1644
1650
  /** @nullable */
1645
1651
  CollectionMethod?: string | null;
@@ -5452,6 +5458,8 @@ export type ActivityAllOf = {
5452
5458
  EntityType?: EntityType;
5453
5459
  /** @nullable */
5454
5460
  EntityUid?: string | null;
5461
+ /** @nullable */
5462
+ Message?: string | null;
5455
5463
  };
5456
5464
 
5457
5465
  export type Activity = AbstractQcountBean & ActivityAllOf;
@@ -6015,6 +6023,9 @@ export type AccountWebhookEntityStripeSubscriptionsItem = {
6015
6023
  /** @nullable */
6016
6024
  TrialEnd?: string | null;
6017
6025
  /** @nullable */
6026
+ ExpirationDate?: string | null;
6027
+ IsCancelling?: boolean;
6028
+ /** @nullable */
6018
6029
  AccountUid?: string | null;
6019
6030
  /** @nullable */
6020
6031
  CollectionMethod?: string | null;
@@ -7770,6 +7781,9 @@ export type AccountWebhookEntityPrimaryStripeSubscription = {
7770
7781
  /** @nullable */
7771
7782
  TrialEnd?: string | null;
7772
7783
  /** @nullable */
7784
+ ExpirationDate?: string | null;
7785
+ IsCancelling?: boolean;
7786
+ /** @nullable */
7773
7787
  AccountUid?: string | null;
7774
7788
  /** @nullable */
7775
7789
  CollectionMethod?: string | null;
@@ -8879,6 +8893,8 @@ export type PersonSupportTicketCreatedWebhookPayload = PersonWebhookEntity & Per
8879
8893
  export interface PersonSupportTicketUpdatedActivityData {
8880
8894
  /** @nullable */
8881
8895
  CaseUid?: string | null;
8896
+ /** @nullable */
8897
+ CaseHistoryUid?: string | null;
8882
8898
  }
8883
8899
 
8884
8900
  export type PersonSupportTicketUpdatedWebhookPayloadAllOf = {