@outseta/react 0.3.7 → 0.4.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/README.md +77 -7
- package/dist/index.js +514 -148
- package/package.json +12 -4
- package/src/components/AuthButton.tsx +33 -0
- package/src/components/AuthEmbed.tsx +4 -0
- package/src/components/EmailListButton.tsx +38 -0
- package/src/components/EmailListEmbed.tsx +28 -0
- package/src/components/EmailListForm.tsx +34 -0
- package/src/components/LeadCaptureButton.tsx +38 -0
- package/src/components/LeadCaptureEmbed.tsx +28 -0
- package/src/components/LoginButton.tsx +18 -0
- package/src/components/LogoutButton.tsx +8 -1
- package/src/components/OutsetaProvider.tsx +36 -7
- package/src/components/ProfileButton.tsx +35 -0
- package/src/components/ProfileEmbed.tsx +8 -2
- package/src/components/PurchaseAddonButton.tsx +8 -4
- package/src/components/SignupButton.tsx +18 -0
- package/src/components/SupportButton.tsx +35 -0
- package/src/components/SupportEmbed.tsx +17 -0
- package/src/components/index.ts +27 -0
- package/src/components/types.ts +33 -4
- package/src/components/utils.ts +13 -0
- package/src/generated/activity/activity.ts +2 -2
- package/src/generated/attribute/attribute.ts +2 -2
- package/src/generated/billing/billing.ts +2 -2
- package/src/generated/crm/crm.ts +2 -2
- package/src/generated/email/email.ts +2 -2
- package/src/generated/public/public.ts +2 -2
- package/src/generated/support/support.ts +2 -2
- package/src/index.ts +1 -1
- package/src/mutator.ts +3 -3
- package/src/query.test.ts +276 -0
- package/src/query.ts +352 -0
package/dist/index.js
CHANGED
|
@@ -21,6 +21,11 @@ function getOutseta() {
|
|
|
21
21
|
}
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
+
function getCurrentUrl() {
|
|
25
|
+
if (typeof window === "undefined")
|
|
26
|
+
return;
|
|
27
|
+
return window.location.href;
|
|
28
|
+
}
|
|
24
29
|
function OutsetaProvider({ children }) {
|
|
25
30
|
const [status, setStatus] = useState("init");
|
|
26
31
|
const [user, setUser] = useState(null);
|
|
@@ -79,31 +84,44 @@ function OutsetaProvider({ children }) {
|
|
|
79
84
|
setUser(null);
|
|
80
85
|
outseta.logout();
|
|
81
86
|
};
|
|
82
|
-
const
|
|
87
|
+
const openAuth = (options = {}) => {
|
|
83
88
|
outsetaRef.current?.auth.open({
|
|
84
89
|
widgetMode: "login|register",
|
|
85
|
-
|
|
90
|
+
mode: "popup",
|
|
91
|
+
authenticationCallbackUrl: getCurrentUrl(),
|
|
86
92
|
...options
|
|
87
93
|
});
|
|
88
94
|
};
|
|
95
|
+
const openLogin = (options = {}) => {
|
|
96
|
+
openAuth({ ...options, widgetMode: "login" });
|
|
97
|
+
};
|
|
89
98
|
const openSignup = (options = {}) => {
|
|
90
|
-
|
|
91
|
-
widgetMode: "register",
|
|
92
|
-
authenticationCallbackUrl: window.location.href,
|
|
93
|
-
...options
|
|
94
|
-
});
|
|
99
|
+
openAuth({ ...options, widgetMode: "register" });
|
|
95
100
|
};
|
|
96
101
|
const openProfile = (options = {}) => {
|
|
97
102
|
outsetaRef.current?.profile.open({ tab: "profile", ...options });
|
|
98
103
|
};
|
|
104
|
+
const openSupport = (options = {}) => {
|
|
105
|
+
outsetaRef.current?.support?.open({ mode: "popup", ...options });
|
|
106
|
+
};
|
|
107
|
+
const openEmailList = (options) => {
|
|
108
|
+
outsetaRef.current?.emailList?.open({ mode: "popup", ...options });
|
|
109
|
+
};
|
|
110
|
+
const openLeadCapture = (options) => {
|
|
111
|
+
outsetaRef.current?.leadCapture?.open({ mode: "popup", ...options });
|
|
112
|
+
};
|
|
99
113
|
return /* @__PURE__ */ jsxDEV(OutsetaContext.Provider, {
|
|
100
114
|
value: {
|
|
101
115
|
user,
|
|
102
116
|
isLoading: status !== "ready",
|
|
103
117
|
logout,
|
|
118
|
+
openAuth,
|
|
104
119
|
openLogin,
|
|
105
120
|
openSignup,
|
|
106
|
-
openProfile
|
|
121
|
+
openProfile,
|
|
122
|
+
openSupport,
|
|
123
|
+
openEmailList,
|
|
124
|
+
openLeadCapture
|
|
107
125
|
},
|
|
108
126
|
children
|
|
109
127
|
}, undefined, false, undefined, this);
|
|
@@ -113,12 +131,14 @@ import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
|
113
131
|
function AuthEmbed({
|
|
114
132
|
widgetMode = "login|register",
|
|
115
133
|
registrationDefaults,
|
|
134
|
+
widgetProps,
|
|
116
135
|
...props
|
|
117
136
|
}) {
|
|
118
137
|
const defaults = typeof registrationDefaults === "string" ? registrationDefaults : registrationDefaults ? JSON.stringify(registrationDefaults) : undefined;
|
|
119
138
|
return /* @__PURE__ */ jsxDEV2("div", {
|
|
120
139
|
...props,
|
|
121
140
|
children: /* @__PURE__ */ jsxDEV2("div", {
|
|
141
|
+
...widgetProps,
|
|
122
142
|
"data-o-auth": "1",
|
|
123
143
|
"data-mode": "embed",
|
|
124
144
|
"data-widget-mode": widgetMode,
|
|
@@ -126,20 +146,214 @@ function AuthEmbed({
|
|
|
126
146
|
}, undefined, false, undefined, this)
|
|
127
147
|
}, widgetMode, false, undefined, this);
|
|
128
148
|
}
|
|
129
|
-
// src/components/
|
|
149
|
+
// src/components/utils.ts
|
|
150
|
+
function composeButtonClick(onClick, action) {
|
|
151
|
+
return (event) => {
|
|
152
|
+
onClick?.(event);
|
|
153
|
+
if (!event.defaultPrevented) {
|
|
154
|
+
action();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// src/components/AuthButton.tsx
|
|
130
160
|
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
131
|
-
function
|
|
132
|
-
|
|
161
|
+
function AuthButton({
|
|
162
|
+
children = "Continue",
|
|
163
|
+
options,
|
|
164
|
+
onClick,
|
|
165
|
+
type = "button",
|
|
166
|
+
...props
|
|
167
|
+
}) {
|
|
168
|
+
const { openAuth } = useOutseta();
|
|
169
|
+
return /* @__PURE__ */ jsxDEV3("button", {
|
|
170
|
+
type,
|
|
171
|
+
...props,
|
|
172
|
+
onClick: composeButtonClick(onClick, () => openAuth(options)),
|
|
173
|
+
children
|
|
174
|
+
}, undefined, false, undefined, this);
|
|
175
|
+
}
|
|
176
|
+
// src/components/LoginButton.tsx
|
|
177
|
+
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
178
|
+
function LoginButton({
|
|
179
|
+
children = "Log in",
|
|
180
|
+
options,
|
|
181
|
+
...props
|
|
182
|
+
}) {
|
|
183
|
+
return /* @__PURE__ */ jsxDEV4(AuthButton, {
|
|
184
|
+
options: { ...options, widgetMode: "login" },
|
|
133
185
|
...props,
|
|
134
|
-
children
|
|
186
|
+
children
|
|
187
|
+
}, undefined, false, undefined, this);
|
|
188
|
+
}
|
|
189
|
+
// src/components/SignupButton.tsx
|
|
190
|
+
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
191
|
+
function SignupButton({
|
|
192
|
+
children = "Sign up",
|
|
193
|
+
options,
|
|
194
|
+
...props
|
|
195
|
+
}) {
|
|
196
|
+
return /* @__PURE__ */ jsxDEV5(AuthButton, {
|
|
197
|
+
options: { ...options, widgetMode: "register" },
|
|
198
|
+
...props,
|
|
199
|
+
children
|
|
200
|
+
}, undefined, false, undefined, this);
|
|
201
|
+
}
|
|
202
|
+
// src/components/ProfileEmbed.tsx
|
|
203
|
+
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
204
|
+
function ProfileEmbed({
|
|
205
|
+
tab = "profile",
|
|
206
|
+
widgetProps,
|
|
207
|
+
...props
|
|
208
|
+
}) {
|
|
209
|
+
return /* @__PURE__ */ jsxDEV6("div", {
|
|
210
|
+
...props,
|
|
211
|
+
children: /* @__PURE__ */ jsxDEV6("div", {
|
|
212
|
+
...widgetProps,
|
|
135
213
|
"data-o-profile": "1",
|
|
136
214
|
"data-mode": "embed",
|
|
137
215
|
"data-tab": tab
|
|
138
216
|
}, undefined, false, undefined, this)
|
|
139
217
|
}, tab, false, undefined, this);
|
|
140
218
|
}
|
|
219
|
+
// src/components/ProfileButton.tsx
|
|
220
|
+
import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
|
|
221
|
+
function ProfileButton({
|
|
222
|
+
children = "Profile",
|
|
223
|
+
options,
|
|
224
|
+
onClick,
|
|
225
|
+
type = "button",
|
|
226
|
+
...props
|
|
227
|
+
}) {
|
|
228
|
+
const { openProfile } = useOutseta();
|
|
229
|
+
return /* @__PURE__ */ jsxDEV7("button", {
|
|
230
|
+
type,
|
|
231
|
+
...props,
|
|
232
|
+
onClick: composeButtonClick(onClick, () => openProfile({ mode: "popup", ...options })),
|
|
233
|
+
children
|
|
234
|
+
}, undefined, false, undefined, this);
|
|
235
|
+
}
|
|
236
|
+
// src/components/SupportEmbed.tsx
|
|
237
|
+
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
|
238
|
+
function SupportEmbed({ widgetProps, ...props }) {
|
|
239
|
+
return /* @__PURE__ */ jsxDEV8("div", {
|
|
240
|
+
...props,
|
|
241
|
+
children: /* @__PURE__ */ jsxDEV8("div", {
|
|
242
|
+
...widgetProps,
|
|
243
|
+
"data-o-support": "1",
|
|
244
|
+
"data-mode": "embed"
|
|
245
|
+
}, undefined, false, undefined, this)
|
|
246
|
+
}, undefined, false, undefined, this);
|
|
247
|
+
}
|
|
248
|
+
// src/components/SupportButton.tsx
|
|
249
|
+
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
|
250
|
+
function SupportButton({
|
|
251
|
+
children = "Contact support",
|
|
252
|
+
options,
|
|
253
|
+
onClick,
|
|
254
|
+
type = "button",
|
|
255
|
+
...props
|
|
256
|
+
}) {
|
|
257
|
+
const { openSupport } = useOutseta();
|
|
258
|
+
return /* @__PURE__ */ jsxDEV9("button", {
|
|
259
|
+
type,
|
|
260
|
+
...props,
|
|
261
|
+
onClick: composeButtonClick(onClick, () => openSupport({ mode: "popup", ...options })),
|
|
262
|
+
children
|
|
263
|
+
}, undefined, false, undefined, this);
|
|
264
|
+
}
|
|
265
|
+
// src/components/EmailListEmbed.tsx
|
|
266
|
+
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
|
267
|
+
function EmailListEmbed({
|
|
268
|
+
emailListUid,
|
|
269
|
+
widgetProps,
|
|
270
|
+
...props
|
|
271
|
+
}) {
|
|
272
|
+
return /* @__PURE__ */ jsxDEV10("div", {
|
|
273
|
+
...props,
|
|
274
|
+
children: /* @__PURE__ */ jsxDEV10("div", {
|
|
275
|
+
...widgetProps,
|
|
276
|
+
"data-o-email-list": "1",
|
|
277
|
+
"data-mode": "embed",
|
|
278
|
+
"data-email-list-uid": emailListUid
|
|
279
|
+
}, undefined, false, undefined, this)
|
|
280
|
+
}, emailListUid, false, undefined, this);
|
|
281
|
+
}
|
|
282
|
+
// src/components/EmailListButton.tsx
|
|
283
|
+
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
|
284
|
+
function EmailListButton({
|
|
285
|
+
children = "Subscribe",
|
|
286
|
+
emailListUid,
|
|
287
|
+
options,
|
|
288
|
+
onClick,
|
|
289
|
+
type = "button",
|
|
290
|
+
...props
|
|
291
|
+
}) {
|
|
292
|
+
const { openEmailList } = useOutseta();
|
|
293
|
+
return /* @__PURE__ */ jsxDEV11("button", {
|
|
294
|
+
type,
|
|
295
|
+
...props,
|
|
296
|
+
onClick: composeButtonClick(onClick, () => openEmailList({ mode: "popup", ...options, emailListUid })),
|
|
297
|
+
children
|
|
298
|
+
}, undefined, false, undefined, this);
|
|
299
|
+
}
|
|
300
|
+
// src/components/EmailListForm.tsx
|
|
301
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
|
302
|
+
function getSubscribeAction(domain, emailListUid) {
|
|
303
|
+
const hasProtocol = domain.startsWith("http://") || domain.startsWith("https://");
|
|
304
|
+
const baseUrl = hasProtocol ? domain : `https://${domain}`;
|
|
305
|
+
return `${baseUrl.replace(/\/$/, "")}/email/lists/${emailListUid}/subscribe`;
|
|
306
|
+
}
|
|
307
|
+
function EmailListForm({
|
|
308
|
+
domain,
|
|
309
|
+
emailListUid,
|
|
310
|
+
action,
|
|
311
|
+
method = "post",
|
|
312
|
+
...props
|
|
313
|
+
}) {
|
|
314
|
+
return /* @__PURE__ */ jsxDEV12("form", {
|
|
315
|
+
action: action ?? getSubscribeAction(domain, emailListUid),
|
|
316
|
+
method,
|
|
317
|
+
...props
|
|
318
|
+
}, undefined, false, undefined, this);
|
|
319
|
+
}
|
|
320
|
+
// src/components/LeadCaptureEmbed.tsx
|
|
321
|
+
import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
|
|
322
|
+
function LeadCaptureEmbed({
|
|
323
|
+
formUid,
|
|
324
|
+
widgetProps,
|
|
325
|
+
...props
|
|
326
|
+
}) {
|
|
327
|
+
return /* @__PURE__ */ jsxDEV13("div", {
|
|
328
|
+
...props,
|
|
329
|
+
children: /* @__PURE__ */ jsxDEV13("div", {
|
|
330
|
+
...widgetProps,
|
|
331
|
+
"data-o-lead-capture": "1",
|
|
332
|
+
"data-mode": "embed",
|
|
333
|
+
"data-form-uid": formUid
|
|
334
|
+
}, undefined, false, undefined, this)
|
|
335
|
+
}, formUid, false, undefined, this);
|
|
336
|
+
}
|
|
337
|
+
// src/components/LeadCaptureButton.tsx
|
|
338
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
|
339
|
+
function LeadCaptureButton({
|
|
340
|
+
children = "Get in touch",
|
|
341
|
+
formUid,
|
|
342
|
+
options,
|
|
343
|
+
onClick,
|
|
344
|
+
type = "button",
|
|
345
|
+
...props
|
|
346
|
+
}) {
|
|
347
|
+
const { openLeadCapture } = useOutseta();
|
|
348
|
+
return /* @__PURE__ */ jsxDEV14("button", {
|
|
349
|
+
type,
|
|
350
|
+
...props,
|
|
351
|
+
onClick: composeButtonClick(onClick, () => openLeadCapture({ mode: "popup", ...options, formUid })),
|
|
352
|
+
children
|
|
353
|
+
}, undefined, false, undefined, this);
|
|
354
|
+
}
|
|
141
355
|
// src/components/AuthCta.tsx
|
|
142
|
-
import { jsxDEV as
|
|
356
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
|
143
357
|
function AuthCta({
|
|
144
358
|
message = "Sign up or log in to continue.",
|
|
145
359
|
signupLabel = "Sign up",
|
|
@@ -147,19 +361,19 @@ function AuthCta({
|
|
|
147
361
|
...props
|
|
148
362
|
}) {
|
|
149
363
|
const { openSignup, openLogin } = useOutseta();
|
|
150
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ jsxDEV15("div", {
|
|
151
365
|
...props,
|
|
152
366
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ jsxDEV15("p", {
|
|
154
368
|
children: message
|
|
155
369
|
}, undefined, false, undefined, this),
|
|
156
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ jsxDEV15("button", {
|
|
157
371
|
type: "button",
|
|
158
372
|
onClick: () => openSignup(),
|
|
159
373
|
children: signupLabel
|
|
160
374
|
}, undefined, false, undefined, this),
|
|
161
375
|
" ",
|
|
162
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ jsxDEV15("button", {
|
|
163
377
|
type: "button",
|
|
164
378
|
onClick: () => openLogin(),
|
|
165
379
|
children: loginLabel
|
|
@@ -169,7 +383,7 @@ function AuthCta({
|
|
|
169
383
|
}
|
|
170
384
|
|
|
171
385
|
// src/components/UpgradeCta.tsx
|
|
172
|
-
import { jsxDEV as
|
|
386
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
|
173
387
|
function UpgradeCta({
|
|
174
388
|
message = "Your current plan does not include access to this content.",
|
|
175
389
|
buttonLabel = "Manage subscription",
|
|
@@ -177,13 +391,13 @@ function UpgradeCta({
|
|
|
177
391
|
...props
|
|
178
392
|
}) {
|
|
179
393
|
const { openProfile } = useOutseta();
|
|
180
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ jsxDEV16("div", {
|
|
181
395
|
...props,
|
|
182
396
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ jsxDEV16("p", {
|
|
184
398
|
children: message
|
|
185
399
|
}, undefined, false, undefined, this),
|
|
186
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ jsxDEV16("button", {
|
|
187
401
|
type: "button",
|
|
188
402
|
onClick: () => openProfile(profileOptions),
|
|
189
403
|
children: buttonLabel
|
|
@@ -193,7 +407,7 @@ function UpgradeCta({
|
|
|
193
407
|
}
|
|
194
408
|
|
|
195
409
|
// src/components/ProtectedRoute.tsx
|
|
196
|
-
import { jsxDEV as
|
|
410
|
+
import { jsxDEV as jsxDEV17, Fragment } from "react/jsx-dev-runtime";
|
|
197
411
|
function ProtectedRoute({
|
|
198
412
|
plans,
|
|
199
413
|
children,
|
|
@@ -205,12 +419,12 @@ function ProtectedRoute({
|
|
|
205
419
|
}) {
|
|
206
420
|
const { user, isLoading } = useOutseta();
|
|
207
421
|
if (isLoading)
|
|
208
|
-
return /* @__PURE__ */
|
|
422
|
+
return /* @__PURE__ */ jsxDEV17(Fragment, {
|
|
209
423
|
children: loading
|
|
210
424
|
}, undefined, false, undefined, this);
|
|
211
425
|
if (!user) {
|
|
212
|
-
return /* @__PURE__ */
|
|
213
|
-
children: unauthenticated ?? /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ jsxDEV17(Fragment, {
|
|
427
|
+
children: unauthenticated ?? /* @__PURE__ */ jsxDEV17(AuthCta, {
|
|
214
428
|
message: unauthenticatedMessage
|
|
215
429
|
}, undefined, false, undefined, this)
|
|
216
430
|
}, undefined, false, undefined, this);
|
|
@@ -218,53 +432,210 @@ function ProtectedRoute({
|
|
|
218
432
|
const userPlanUid = user.Account?.CurrentSubscription?.Plan?.Uid;
|
|
219
433
|
const hasAccess = userPlanUid ? plans.includes(userPlanUid) : false;
|
|
220
434
|
if (!hasAccess) {
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
children: accessDenied ?? /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ jsxDEV17(Fragment, {
|
|
436
|
+
children: accessDenied ?? /* @__PURE__ */ jsxDEV17(UpgradeCta, {
|
|
223
437
|
message: accessDeniedMessage
|
|
224
438
|
}, undefined, false, undefined, this)
|
|
225
439
|
}, undefined, false, undefined, this);
|
|
226
440
|
}
|
|
227
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ jsxDEV17(Fragment, {
|
|
228
442
|
children
|
|
229
443
|
}, undefined, false, undefined, this);
|
|
230
444
|
}
|
|
231
445
|
// src/components/PurchaseAddonButton.tsx
|
|
232
|
-
import { jsxDEV as
|
|
446
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
|
233
447
|
function PurchaseAddonButton({
|
|
234
448
|
addonUid,
|
|
235
449
|
billingRenewalTerm = 4,
|
|
236
450
|
children = "Buy Add-on",
|
|
451
|
+
onClick,
|
|
452
|
+
type = "button",
|
|
237
453
|
...props
|
|
238
454
|
}) {
|
|
239
455
|
const { openProfile } = useOutseta();
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
-
|
|
456
|
+
return /* @__PURE__ */ jsxDEV18("button", {
|
|
457
|
+
type,
|
|
458
|
+
...props,
|
|
459
|
+
onClick: composeButtonClick(onClick, () => openProfile({
|
|
242
460
|
mode: "popup",
|
|
243
461
|
tab: "purchaseAddOn",
|
|
244
462
|
stateProps: { addOnUid: addonUid, billingRenewalTerm }
|
|
245
|
-
}),
|
|
246
|
-
...props,
|
|
463
|
+
})),
|
|
247
464
|
children
|
|
248
465
|
}, undefined, false, undefined, this);
|
|
249
466
|
}
|
|
250
467
|
// src/components/LogoutButton.tsx
|
|
251
|
-
import { jsxDEV as
|
|
468
|
+
import { jsxDEV as jsxDEV19 } from "react/jsx-dev-runtime";
|
|
252
469
|
function LogoutButton({
|
|
253
470
|
children = "Logout",
|
|
471
|
+
onClick,
|
|
472
|
+
type = "button",
|
|
254
473
|
...props
|
|
255
474
|
}) {
|
|
256
475
|
const { logout } = useOutseta();
|
|
257
|
-
return /* @__PURE__ */
|
|
258
|
-
|
|
476
|
+
return /* @__PURE__ */ jsxDEV19("button", {
|
|
477
|
+
type,
|
|
259
478
|
...props,
|
|
479
|
+
onClick: composeButtonClick(onClick, logout),
|
|
260
480
|
children
|
|
261
481
|
}, undefined, false, undefined, this);
|
|
262
482
|
}
|
|
263
|
-
// src/
|
|
264
|
-
import {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
483
|
+
// src/query.ts
|
|
484
|
+
import { useCallback, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
|
|
485
|
+
function useQuery(options) {
|
|
486
|
+
const { queryKey, enabled = true } = options;
|
|
487
|
+
const keyHash = JSON.stringify(queryKey ?? []);
|
|
488
|
+
const optionsRef = useRef2(options);
|
|
489
|
+
optionsRef.current = options;
|
|
490
|
+
const abortRef = useRef2(null);
|
|
491
|
+
const mountedRef = useRef2(true);
|
|
492
|
+
useEffect2(() => {
|
|
493
|
+
mountedRef.current = true;
|
|
494
|
+
return () => {
|
|
495
|
+
mountedRef.current = false;
|
|
496
|
+
};
|
|
497
|
+
}, []);
|
|
498
|
+
const [state, setState] = useState2(() => {
|
|
499
|
+
const { initialData } = optionsRef.current;
|
|
500
|
+
const resolved = typeof initialData === "function" ? initialData() : initialData;
|
|
501
|
+
return resolved !== undefined ? { status: "success", data: resolved, error: null } : { status: "pending", data: undefined, error: null };
|
|
502
|
+
});
|
|
503
|
+
const [isFetching, setIsFetching] = useState2(false);
|
|
504
|
+
const runQuery = useCallback(async () => {
|
|
505
|
+
const { queryFn, queryKey: key, select } = optionsRef.current;
|
|
506
|
+
if (!queryFn)
|
|
507
|
+
return;
|
|
508
|
+
abortRef.current?.abort();
|
|
509
|
+
const controller = new AbortController;
|
|
510
|
+
abortRef.current = controller;
|
|
511
|
+
setIsFetching(true);
|
|
512
|
+
try {
|
|
513
|
+
const raw = await queryFn({
|
|
514
|
+
signal: controller.signal,
|
|
515
|
+
queryKey: key ?? []
|
|
516
|
+
});
|
|
517
|
+
if (controller.signal.aborted || !mountedRef.current)
|
|
518
|
+
return;
|
|
519
|
+
const data = select ? select(raw) : raw;
|
|
520
|
+
setState({ status: "success", data, error: null });
|
|
521
|
+
} catch (error) {
|
|
522
|
+
if (controller.signal.aborted || !mountedRef.current)
|
|
523
|
+
return;
|
|
524
|
+
setState((prev) => ({
|
|
525
|
+
status: "error",
|
|
526
|
+
data: prev.data,
|
|
527
|
+
error
|
|
528
|
+
}));
|
|
529
|
+
} finally {
|
|
530
|
+
if (!controller.signal.aborted && mountedRef.current) {
|
|
531
|
+
setIsFetching(false);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}, []);
|
|
535
|
+
useEffect2(() => {
|
|
536
|
+
if (!enabled)
|
|
537
|
+
return;
|
|
538
|
+
runQuery();
|
|
539
|
+
return () => {
|
|
540
|
+
abortRef.current?.abort();
|
|
541
|
+
};
|
|
542
|
+
}, [enabled, keyHash, runQuery]);
|
|
543
|
+
const refetch = useCallback(async () => {
|
|
544
|
+
await runQuery();
|
|
545
|
+
}, [runQuery]);
|
|
546
|
+
const status = state.status;
|
|
547
|
+
return {
|
|
548
|
+
data: state.data,
|
|
549
|
+
error: state.error,
|
|
550
|
+
status,
|
|
551
|
+
isPending: status === "pending",
|
|
552
|
+
isLoading: status === "pending" && isFetching,
|
|
553
|
+
isError: status === "error",
|
|
554
|
+
isSuccess: status === "success",
|
|
555
|
+
isFetching,
|
|
556
|
+
refetch
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
function useMutation(options) {
|
|
560
|
+
const optionsRef = useRef2(options);
|
|
561
|
+
optionsRef.current = options;
|
|
562
|
+
const mountedRef = useRef2(true);
|
|
563
|
+
useEffect2(() => {
|
|
564
|
+
mountedRef.current = true;
|
|
565
|
+
return () => {
|
|
566
|
+
mountedRef.current = false;
|
|
567
|
+
};
|
|
568
|
+
}, []);
|
|
569
|
+
const [state, setState] = useState2({
|
|
570
|
+
status: "idle",
|
|
571
|
+
data: undefined,
|
|
572
|
+
error: null,
|
|
573
|
+
variables: undefined
|
|
574
|
+
});
|
|
575
|
+
const mutateAsync = useCallback(async (variables, mutateOptions) => {
|
|
576
|
+
const opts = optionsRef.current;
|
|
577
|
+
const { mutationFn } = opts;
|
|
578
|
+
if (!mutationFn) {
|
|
579
|
+
throw new Error("@outseta/react: useMutation called without a mutationFn.");
|
|
580
|
+
}
|
|
581
|
+
if (mountedRef.current) {
|
|
582
|
+
setState({
|
|
583
|
+
status: "pending",
|
|
584
|
+
data: undefined,
|
|
585
|
+
error: null,
|
|
586
|
+
variables
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
let context;
|
|
590
|
+
try {
|
|
591
|
+
context = await opts.onMutate?.(variables);
|
|
592
|
+
const data = await mutationFn(variables);
|
|
593
|
+
if (mountedRef.current) {
|
|
594
|
+
setState({ status: "success", data, error: null, variables });
|
|
595
|
+
}
|
|
596
|
+
await opts.onSuccess?.(data, variables, context);
|
|
597
|
+
await mutateOptions?.onSuccess?.(data, variables, context);
|
|
598
|
+
await opts.onSettled?.(data, null, variables, context);
|
|
599
|
+
await mutateOptions?.onSettled?.(data, null, variables, context);
|
|
600
|
+
return data;
|
|
601
|
+
} catch (error) {
|
|
602
|
+
const typedError = error;
|
|
603
|
+
if (mountedRef.current) {
|
|
604
|
+
setState({
|
|
605
|
+
status: "error",
|
|
606
|
+
data: undefined,
|
|
607
|
+
error: typedError,
|
|
608
|
+
variables
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
await opts.onError?.(typedError, variables, context);
|
|
612
|
+
await mutateOptions?.onError?.(typedError, variables, context);
|
|
613
|
+
await opts.onSettled?.(undefined, typedError, variables, context);
|
|
614
|
+
await mutateOptions?.onSettled?.(undefined, typedError, variables, context);
|
|
615
|
+
throw error;
|
|
616
|
+
}
|
|
617
|
+
}, []);
|
|
618
|
+
const mutate = useCallback((variables, mutateOptions) => {
|
|
619
|
+
mutateAsync(variables, mutateOptions).catch(() => {});
|
|
620
|
+
}, [mutateAsync]);
|
|
621
|
+
const reset = useCallback(() => {
|
|
622
|
+
setState({ status: "idle", data: undefined, error: null, variables: undefined });
|
|
623
|
+
}, []);
|
|
624
|
+
const status = state.status;
|
|
625
|
+
return {
|
|
626
|
+
data: state.data,
|
|
627
|
+
error: state.error,
|
|
628
|
+
variables: state.variables,
|
|
629
|
+
status,
|
|
630
|
+
isIdle: status === "idle",
|
|
631
|
+
isPending: status === "pending",
|
|
632
|
+
isError: status === "error",
|
|
633
|
+
isSuccess: status === "success",
|
|
634
|
+
mutate,
|
|
635
|
+
mutateAsync,
|
|
636
|
+
reset
|
|
637
|
+
};
|
|
638
|
+
}
|
|
268
639
|
|
|
269
640
|
// src/mutator.ts
|
|
270
641
|
var customFetch = async (config, client) => {
|
|
@@ -340,10 +711,6 @@ var useActivityAddCustomActivity = (options) => {
|
|
|
340
711
|
return useMutation(mutationOptions);
|
|
341
712
|
};
|
|
342
713
|
// src/generated/billing/billing.ts
|
|
343
|
-
import {
|
|
344
|
-
useMutation as useMutation2,
|
|
345
|
-
useQuery as useQuery2
|
|
346
|
-
} from "@tanstack/react-query";
|
|
347
714
|
var discountCouponGetDiscountCouponByCode = (code, params, options, signal) => {
|
|
348
715
|
return customFetch({
|
|
349
716
|
url: `/api/v1/public/billing/discountcoupons/${code}`,
|
|
@@ -366,7 +733,7 @@ var getDiscountCouponGetDiscountCouponByCodeQueryOptions = (code, params, option
|
|
|
366
733
|
};
|
|
367
734
|
function useDiscountCouponGetDiscountCouponByCode(code, params, options) {
|
|
368
735
|
const queryOptions = getDiscountCouponGetDiscountCouponByCodeQueryOptions(code, params, options);
|
|
369
|
-
const query =
|
|
736
|
+
const query = useQuery(queryOptions);
|
|
370
737
|
query.queryKey = queryOptions.queryKey;
|
|
371
738
|
return query;
|
|
372
739
|
}
|
|
@@ -392,7 +759,7 @@ var getDiscountCouponGetAllDiscountCouponsQueryOptions = (params, options) => {
|
|
|
392
759
|
};
|
|
393
760
|
function useDiscountCouponGetAllDiscountCoupons(params, options) {
|
|
394
761
|
const queryOptions = getDiscountCouponGetAllDiscountCouponsQueryOptions(params, options);
|
|
395
|
-
const query =
|
|
762
|
+
const query = useQuery(queryOptions);
|
|
396
763
|
query.queryKey = queryOptions.queryKey;
|
|
397
764
|
return query;
|
|
398
765
|
}
|
|
@@ -416,7 +783,7 @@ var getDiscountCouponAddDiscountCouponMutationOptions = (options) => {
|
|
|
416
783
|
};
|
|
417
784
|
var useDiscountCouponAddDiscountCoupon = (options) => {
|
|
418
785
|
const mutationOptions = getDiscountCouponAddDiscountCouponMutationOptions(options);
|
|
419
|
-
return
|
|
786
|
+
return useMutation(mutationOptions);
|
|
420
787
|
};
|
|
421
788
|
var discountCouponGetDiscountCoupon = (discountCouponUid, options, signal) => {
|
|
422
789
|
return customFetch({
|
|
@@ -438,7 +805,7 @@ var getDiscountCouponGetDiscountCouponQueryOptions = (discountCouponUid, options
|
|
|
438
805
|
};
|
|
439
806
|
function useDiscountCouponGetDiscountCoupon(discountCouponUid, options) {
|
|
440
807
|
const queryOptions = getDiscountCouponGetDiscountCouponQueryOptions(discountCouponUid, options);
|
|
441
|
-
const query =
|
|
808
|
+
const query = useQuery(queryOptions);
|
|
442
809
|
query.queryKey = queryOptions.queryKey;
|
|
443
810
|
return query;
|
|
444
811
|
}
|
|
@@ -461,7 +828,7 @@ var getDiscountCouponUpdateDiscountCouponMutationOptions = (options) => {
|
|
|
461
828
|
};
|
|
462
829
|
var useDiscountCouponUpdateDiscountCoupon = (options) => {
|
|
463
830
|
const mutationOptions = getDiscountCouponUpdateDiscountCouponMutationOptions(options);
|
|
464
|
-
return
|
|
831
|
+
return useMutation(mutationOptions);
|
|
465
832
|
};
|
|
466
833
|
var discountCouponDeleteDiscountCoupon = (discountCouponUid, options) => {
|
|
467
834
|
return customFetch({
|
|
@@ -481,7 +848,7 @@ var getDiscountCouponDeleteDiscountCouponMutationOptions = (options) => {
|
|
|
481
848
|
};
|
|
482
849
|
var useDiscountCouponDeleteDiscountCoupon = (options) => {
|
|
483
850
|
const mutationOptions = getDiscountCouponDeleteDiscountCouponMutationOptions(options);
|
|
484
|
-
return
|
|
851
|
+
return useMutation(mutationOptions);
|
|
485
852
|
};
|
|
486
853
|
var discountCouponGetDiscountCouponRedemptions = (discountCouponUid, params, options, signal) => {
|
|
487
854
|
return customFetch({
|
|
@@ -505,7 +872,7 @@ var getDiscountCouponGetDiscountCouponRedemptionsQueryOptions = (discountCouponU
|
|
|
505
872
|
};
|
|
506
873
|
function useDiscountCouponGetDiscountCouponRedemptions(discountCouponUid, params, options) {
|
|
507
874
|
const queryOptions = getDiscountCouponGetDiscountCouponRedemptionsQueryOptions(discountCouponUid, params, options);
|
|
508
|
-
const query =
|
|
875
|
+
const query = useQuery(queryOptions);
|
|
509
876
|
query.queryKey = queryOptions.queryKey;
|
|
510
877
|
return query;
|
|
511
878
|
}
|
|
@@ -529,7 +896,7 @@ var getUsageAddUsageMutationOptions = (options) => {
|
|
|
529
896
|
};
|
|
530
897
|
var useUsageAddUsage = (options) => {
|
|
531
898
|
const mutationOptions = getUsageAddUsageMutationOptions(options);
|
|
532
|
-
return
|
|
899
|
+
return useMutation(mutationOptions);
|
|
533
900
|
};
|
|
534
901
|
var transactionsGetAllTransactionsByAccountId = (accountUid, options, signal) => {
|
|
535
902
|
return customFetch({
|
|
@@ -551,7 +918,7 @@ var getTransactionsGetAllTransactionsByAccountIdQueryOptions = (accountUid, opti
|
|
|
551
918
|
};
|
|
552
919
|
function useTransactionsGetAllTransactionsByAccountId(accountUid, options) {
|
|
553
920
|
const queryOptions = getTransactionsGetAllTransactionsByAccountIdQueryOptions(accountUid, options);
|
|
554
|
-
const query =
|
|
921
|
+
const query = useQuery(queryOptions);
|
|
555
922
|
query.queryKey = queryOptions.queryKey;
|
|
556
923
|
return query;
|
|
557
924
|
}
|
|
@@ -575,7 +942,7 @@ var getTransactionsAddPaymentTransactionMutationOptions = (options) => {
|
|
|
575
942
|
};
|
|
576
943
|
var useTransactionsAddPaymentTransaction = (options) => {
|
|
577
944
|
const mutationOptions = getTransactionsAddPaymentTransactionMutationOptions(options);
|
|
578
|
-
return
|
|
945
|
+
return useMutation(mutationOptions);
|
|
579
946
|
};
|
|
580
947
|
var paymentInformationSavePaymentInformation = (paymentInformationSavePaymentInformationBody, options, signal) => {
|
|
581
948
|
return customFetch({
|
|
@@ -597,7 +964,7 @@ var getPaymentInformationSavePaymentInformationMutationOptions = (options) => {
|
|
|
597
964
|
};
|
|
598
965
|
var usePaymentInformationSavePaymentInformation = (options) => {
|
|
599
966
|
const mutationOptions = getPaymentInformationSavePaymentInformationMutationOptions(options);
|
|
600
|
-
return
|
|
967
|
+
return useMutation(mutationOptions);
|
|
601
968
|
};
|
|
602
969
|
var subscriptionAddOnGetAllSubscriptionsAddOns = (params, options, signal) => {
|
|
603
970
|
return customFetch({
|
|
@@ -621,7 +988,7 @@ var getSubscriptionAddOnGetAllSubscriptionsAddOnsQueryOptions = (params, options
|
|
|
621
988
|
};
|
|
622
989
|
function useSubscriptionAddOnGetAllSubscriptionsAddOns(params, options) {
|
|
623
990
|
const queryOptions = getSubscriptionAddOnGetAllSubscriptionsAddOnsQueryOptions(params, options);
|
|
624
|
-
const query =
|
|
991
|
+
const query = useQuery(queryOptions);
|
|
625
992
|
query.queryKey = queryOptions.queryKey;
|
|
626
993
|
return query;
|
|
627
994
|
}
|
|
@@ -646,7 +1013,7 @@ var getSubscriptionAddOnAddSubscriptionAddOnMutationOptions = (options) => {
|
|
|
646
1013
|
};
|
|
647
1014
|
var useSubscriptionAddOnAddSubscriptionAddOn = (options) => {
|
|
648
1015
|
const mutationOptions = getSubscriptionAddOnAddSubscriptionAddOnMutationOptions(options);
|
|
649
|
-
return
|
|
1016
|
+
return useMutation(mutationOptions);
|
|
650
1017
|
};
|
|
651
1018
|
var subscriptionAddOnGetSubscriptionAddOn = (subscriptionAddOnUid, options, signal) => {
|
|
652
1019
|
return customFetch({
|
|
@@ -668,7 +1035,7 @@ var getSubscriptionAddOnGetSubscriptionAddOnQueryOptions = (subscriptionAddOnUid
|
|
|
668
1035
|
};
|
|
669
1036
|
function useSubscriptionAddOnGetSubscriptionAddOn(subscriptionAddOnUid, options) {
|
|
670
1037
|
const queryOptions = getSubscriptionAddOnGetSubscriptionAddOnQueryOptions(subscriptionAddOnUid, options);
|
|
671
|
-
const query =
|
|
1038
|
+
const query = useQuery(queryOptions);
|
|
672
1039
|
query.queryKey = queryOptions.queryKey;
|
|
673
1040
|
return query;
|
|
674
1041
|
}
|
|
@@ -692,7 +1059,7 @@ var getSubscriptionAddOnAddSubscriptionAddOnPreviewMutationOptions = (options) =
|
|
|
692
1059
|
};
|
|
693
1060
|
var useSubscriptionAddOnAddSubscriptionAddOnPreview = (options) => {
|
|
694
1061
|
const mutationOptions = getSubscriptionAddOnAddSubscriptionAddOnPreviewMutationOptions(options);
|
|
695
|
-
return
|
|
1062
|
+
return useMutation(mutationOptions);
|
|
696
1063
|
};
|
|
697
1064
|
var subscriptionAddOnSetAddOnUpgradeRequired = (subscriptionAddOnUid, subscriptionAddOnSetAddOnUpgradeRequiredBody, options) => {
|
|
698
1065
|
return customFetch({
|
|
@@ -713,7 +1080,7 @@ var getSubscriptionAddOnSetAddOnUpgradeRequiredMutationOptions = (options) => {
|
|
|
713
1080
|
};
|
|
714
1081
|
var useSubscriptionAddOnSetAddOnUpgradeRequired = (options) => {
|
|
715
1082
|
const mutationOptions = getSubscriptionAddOnSetAddOnUpgradeRequiredMutationOptions(options);
|
|
716
|
-
return
|
|
1083
|
+
return useMutation(mutationOptions);
|
|
717
1084
|
};
|
|
718
1085
|
var subscriptionAddOnEndSubscriptionAddOn = (subscriptionAddOnUid, options) => {
|
|
719
1086
|
return customFetch({
|
|
@@ -732,7 +1099,7 @@ var getSubscriptionAddOnEndSubscriptionAddOnMutationOptions = (options) => {
|
|
|
732
1099
|
};
|
|
733
1100
|
var useSubscriptionAddOnEndSubscriptionAddOn = (options) => {
|
|
734
1101
|
const mutationOptions = getSubscriptionAddOnEndSubscriptionAddOnMutationOptions(options);
|
|
735
|
-
return
|
|
1102
|
+
return useMutation(mutationOptions);
|
|
736
1103
|
};
|
|
737
1104
|
var subscriptionAddOnExpireSubscriptionAddOn = (subscriptionAddOnUid, options) => {
|
|
738
1105
|
return customFetch({
|
|
@@ -752,7 +1119,7 @@ var getSubscriptionAddOnExpireSubscriptionAddOnMutationOptions = (options) => {
|
|
|
752
1119
|
};
|
|
753
1120
|
var useSubscriptionAddOnExpireSubscriptionAddOn = (options) => {
|
|
754
1121
|
const mutationOptions = getSubscriptionAddOnExpireSubscriptionAddOnMutationOptions(options);
|
|
755
|
-
return
|
|
1122
|
+
return useMutation(mutationOptions);
|
|
756
1123
|
};
|
|
757
1124
|
var invoiceGetAllInvoices = (options, signal) => {
|
|
758
1125
|
return customFetch({
|
|
@@ -774,7 +1141,7 @@ var getInvoiceGetAllInvoicesQueryOptions = (options) => {
|
|
|
774
1141
|
};
|
|
775
1142
|
function useInvoiceGetAllInvoices(options) {
|
|
776
1143
|
const queryOptions = getInvoiceGetAllInvoicesQueryOptions(options);
|
|
777
|
-
const query =
|
|
1144
|
+
const query = useQuery(queryOptions);
|
|
778
1145
|
query.queryKey = queryOptions.queryKey;
|
|
779
1146
|
return query;
|
|
780
1147
|
}
|
|
@@ -798,7 +1165,7 @@ var getInvoiceAddInvoiceMutationOptions = (options) => {
|
|
|
798
1165
|
};
|
|
799
1166
|
var useInvoiceAddInvoice = (options) => {
|
|
800
1167
|
const mutationOptions = getInvoiceAddInvoiceMutationOptions(options);
|
|
801
|
-
return
|
|
1168
|
+
return useMutation(mutationOptions);
|
|
802
1169
|
};
|
|
803
1170
|
var invoiceGetInvoice = (invoiceUid, options, signal) => {
|
|
804
1171
|
return customFetch({
|
|
@@ -820,7 +1187,7 @@ var getInvoiceGetInvoiceQueryOptions = (invoiceUid, options) => {
|
|
|
820
1187
|
};
|
|
821
1188
|
function useInvoiceGetInvoice(invoiceUid, options) {
|
|
822
1189
|
const queryOptions = getInvoiceGetInvoiceQueryOptions(invoiceUid, options);
|
|
823
|
-
const query =
|
|
1190
|
+
const query = useQuery(queryOptions);
|
|
824
1191
|
query.queryKey = queryOptions.queryKey;
|
|
825
1192
|
return query;
|
|
826
1193
|
}
|
|
@@ -843,7 +1210,7 @@ var getInvoiceUpdateInvoiceMutationOptions = (options) => {
|
|
|
843
1210
|
};
|
|
844
1211
|
var useInvoiceUpdateInvoice = (options) => {
|
|
845
1212
|
const mutationOptions = getInvoiceUpdateInvoiceMutationOptions(options);
|
|
846
|
-
return
|
|
1213
|
+
return useMutation(mutationOptions);
|
|
847
1214
|
};
|
|
848
1215
|
var invoiceDeleteInvoice = (invoiceUid, options) => {
|
|
849
1216
|
return customFetch({
|
|
@@ -863,7 +1230,7 @@ var getInvoiceDeleteInvoiceMutationOptions = (options) => {
|
|
|
863
1230
|
};
|
|
864
1231
|
var useInvoiceDeleteInvoice = (options) => {
|
|
865
1232
|
const mutationOptions = getInvoiceDeleteInvoiceMutationOptions(options);
|
|
866
|
-
return
|
|
1233
|
+
return useMutation(mutationOptions);
|
|
867
1234
|
};
|
|
868
1235
|
var invoiceGetInvoiceAsPdf = (invoiceUid, options, signal) => {
|
|
869
1236
|
return customFetch({
|
|
@@ -886,7 +1253,7 @@ var getInvoiceGetInvoiceAsPdfQueryOptions = (invoiceUid, options) => {
|
|
|
886
1253
|
};
|
|
887
1254
|
function useInvoiceGetInvoiceAsPdf(invoiceUid, options) {
|
|
888
1255
|
const queryOptions = getInvoiceGetInvoiceAsPdfQueryOptions(invoiceUid, options);
|
|
889
|
-
const query =
|
|
1256
|
+
const query = useQuery(queryOptions);
|
|
890
1257
|
query.queryKey = queryOptions.queryKey;
|
|
891
1258
|
return query;
|
|
892
1259
|
}
|
|
@@ -909,7 +1276,7 @@ var getInvoiceSendInvoiceEmailMutationOptions = (options) => {
|
|
|
909
1276
|
};
|
|
910
1277
|
var useInvoiceSendInvoiceEmail = (options) => {
|
|
911
1278
|
const mutationOptions = getInvoiceSendInvoiceEmailMutationOptions(options);
|
|
912
|
-
return
|
|
1279
|
+
return useMutation(mutationOptions);
|
|
913
1280
|
};
|
|
914
1281
|
var invoiceSendInvoicePaidEmail = (invoiceUid, options, signal) => {
|
|
915
1282
|
return customFetch({
|
|
@@ -930,7 +1297,7 @@ var getInvoiceSendInvoicePaidEmailMutationOptions = (options) => {
|
|
|
930
1297
|
};
|
|
931
1298
|
var useInvoiceSendInvoicePaidEmail = (options) => {
|
|
932
1299
|
const mutationOptions = getInvoiceSendInvoicePaidEmailMutationOptions(options);
|
|
933
|
-
return
|
|
1300
|
+
return useMutation(mutationOptions);
|
|
934
1301
|
};
|
|
935
1302
|
var subscriptionGetAllSubscriptions = (params, options, signal) => {
|
|
936
1303
|
return customFetch({
|
|
@@ -954,7 +1321,7 @@ var getSubscriptionGetAllSubscriptionsQueryOptions = (params, options) => {
|
|
|
954
1321
|
};
|
|
955
1322
|
function useSubscriptionGetAllSubscriptions(params, options) {
|
|
956
1323
|
const queryOptions = getSubscriptionGetAllSubscriptionsQueryOptions(params, options);
|
|
957
|
-
const query =
|
|
1324
|
+
const query = useQuery(queryOptions);
|
|
958
1325
|
query.queryKey = queryOptions.queryKey;
|
|
959
1326
|
return query;
|
|
960
1327
|
}
|
|
@@ -978,7 +1345,7 @@ var getSubscriptionGetSubscriptionQueryOptions = (subscriptionUid, options) => {
|
|
|
978
1345
|
};
|
|
979
1346
|
function useSubscriptionGetSubscription(subscriptionUid, options) {
|
|
980
1347
|
const queryOptions = getSubscriptionGetSubscriptionQueryOptions(subscriptionUid, options);
|
|
981
|
-
const query =
|
|
1348
|
+
const query = useQuery(queryOptions);
|
|
982
1349
|
query.queryKey = queryOptions.queryKey;
|
|
983
1350
|
return query;
|
|
984
1351
|
}
|
|
@@ -1000,7 +1367,7 @@ var getSubscriptionDeleteSubscriptionMutationOptions = (options) => {
|
|
|
1000
1367
|
};
|
|
1001
1368
|
var useSubscriptionDeleteSubscription = (options) => {
|
|
1002
1369
|
const mutationOptions = getSubscriptionDeleteSubscriptionMutationOptions(options);
|
|
1003
|
-
return
|
|
1370
|
+
return useMutation(mutationOptions);
|
|
1004
1371
|
};
|
|
1005
1372
|
var subscriptionAddDiscountToSubscription = (subscriptionUid, discountUid, options, signal) => {
|
|
1006
1373
|
return customFetch({
|
|
@@ -1021,7 +1388,7 @@ var getSubscriptionAddDiscountToSubscriptionMutationOptions = (options) => {
|
|
|
1021
1388
|
};
|
|
1022
1389
|
var useSubscriptionAddDiscountToSubscription = (options) => {
|
|
1023
1390
|
const mutationOptions = getSubscriptionAddDiscountToSubscriptionMutationOptions(options);
|
|
1024
|
-
return
|
|
1391
|
+
return useMutation(mutationOptions);
|
|
1025
1392
|
};
|
|
1026
1393
|
var subscriptionExpireDiscountCouponSubscription = (subscriptionUid, discountUid, options) => {
|
|
1027
1394
|
return customFetch({
|
|
@@ -1041,7 +1408,7 @@ var getSubscriptionExpireDiscountCouponSubscriptionMutationOptions = (options) =
|
|
|
1041
1408
|
};
|
|
1042
1409
|
var useSubscriptionExpireDiscountCouponSubscription = (options) => {
|
|
1043
1410
|
const mutationOptions = getSubscriptionExpireDiscountCouponSubscriptionMutationOptions(options);
|
|
1044
|
-
return
|
|
1411
|
+
return useMutation(mutationOptions);
|
|
1045
1412
|
};
|
|
1046
1413
|
var subscriptionSetSubscriptionUpgradeRequired = (subscriptionUid, subscriptionSetSubscriptionUpgradeRequiredBody, options) => {
|
|
1047
1414
|
return customFetch({
|
|
@@ -1062,7 +1429,7 @@ var getSubscriptionSetSubscriptionUpgradeRequiredMutationOptions = (options) =>
|
|
|
1062
1429
|
};
|
|
1063
1430
|
var useSubscriptionSetSubscriptionUpgradeRequired = (options) => {
|
|
1064
1431
|
const mutationOptions = getSubscriptionSetSubscriptionUpgradeRequiredMutationOptions(options);
|
|
1065
|
-
return
|
|
1432
|
+
return useMutation(mutationOptions);
|
|
1066
1433
|
};
|
|
1067
1434
|
var subscriptionFirstTimeSubscriptionPreview = (subscriptionFirstTimeSubscriptionPreviewBody, params, options, signal) => {
|
|
1068
1435
|
return customFetch({
|
|
@@ -1085,7 +1452,7 @@ var getSubscriptionFirstTimeSubscriptionPreviewMutationOptions = (options) => {
|
|
|
1085
1452
|
};
|
|
1086
1453
|
var useSubscriptionFirstTimeSubscriptionPreview = (options) => {
|
|
1087
1454
|
const mutationOptions = getSubscriptionFirstTimeSubscriptionPreviewMutationOptions(options);
|
|
1088
|
-
return
|
|
1455
|
+
return useMutation(mutationOptions);
|
|
1089
1456
|
};
|
|
1090
1457
|
var subscriptionFirstTimeSubscription = (subscriptionFirstTimeSubscriptionBody, options) => {
|
|
1091
1458
|
return customFetch({
|
|
@@ -1106,7 +1473,7 @@ var getSubscriptionFirstTimeSubscriptionMutationOptions = (options) => {
|
|
|
1106
1473
|
};
|
|
1107
1474
|
var useSubscriptionFirstTimeSubscription = (options) => {
|
|
1108
1475
|
const mutationOptions = getSubscriptionFirstTimeSubscriptionMutationOptions(options);
|
|
1109
|
-
return
|
|
1476
|
+
return useMutation(mutationOptions);
|
|
1110
1477
|
};
|
|
1111
1478
|
var subscriptionChangeSubscriptionPreview = (subscriptionUid, subscriptionChangeSubscriptionPreviewBody, params, options) => {
|
|
1112
1479
|
return customFetch({
|
|
@@ -1128,7 +1495,7 @@ var getSubscriptionChangeSubscriptionPreviewMutationOptions = (options) => {
|
|
|
1128
1495
|
};
|
|
1129
1496
|
var useSubscriptionChangeSubscriptionPreview = (options) => {
|
|
1130
1497
|
const mutationOptions = getSubscriptionChangeSubscriptionPreviewMutationOptions(options);
|
|
1131
|
-
return
|
|
1498
|
+
return useMutation(mutationOptions);
|
|
1132
1499
|
};
|
|
1133
1500
|
var subscriptionChangeSubscription = (subscriptionUid, subscriptionChangeSubscriptionBody, params, options) => {
|
|
1134
1501
|
return customFetch({
|
|
@@ -1150,7 +1517,7 @@ var getSubscriptionChangeSubscriptionMutationOptions = (options) => {
|
|
|
1150
1517
|
};
|
|
1151
1518
|
var useSubscriptionChangeSubscription = (options) => {
|
|
1152
1519
|
const mutationOptions = getSubscriptionChangeSubscriptionMutationOptions(options);
|
|
1153
|
-
return
|
|
1520
|
+
return useMutation(mutationOptions);
|
|
1154
1521
|
};
|
|
1155
1522
|
var planGetAllPlans = (options, signal) => {
|
|
1156
1523
|
return customFetch({
|
|
@@ -1172,7 +1539,7 @@ var getPlanGetAllPlansQueryOptions = (options) => {
|
|
|
1172
1539
|
};
|
|
1173
1540
|
function usePlanGetAllPlans(options) {
|
|
1174
1541
|
const queryOptions = getPlanGetAllPlansQueryOptions(options);
|
|
1175
|
-
const query =
|
|
1542
|
+
const query = useQuery(queryOptions);
|
|
1176
1543
|
query.queryKey = queryOptions.queryKey;
|
|
1177
1544
|
return query;
|
|
1178
1545
|
}
|
|
@@ -1196,7 +1563,7 @@ var getPlanAddPlanMutationOptions = (options) => {
|
|
|
1196
1563
|
};
|
|
1197
1564
|
var usePlanAddPlan = (options) => {
|
|
1198
1565
|
const mutationOptions = getPlanAddPlanMutationOptions(options);
|
|
1199
|
-
return
|
|
1566
|
+
return useMutation(mutationOptions);
|
|
1200
1567
|
};
|
|
1201
1568
|
var planGetPlan = (planUid, options, signal) => {
|
|
1202
1569
|
return customFetch({
|
|
@@ -1218,7 +1585,7 @@ var getPlanGetPlanQueryOptions = (planUid, options) => {
|
|
|
1218
1585
|
};
|
|
1219
1586
|
function usePlanGetPlan(planUid, options) {
|
|
1220
1587
|
const queryOptions = getPlanGetPlanQueryOptions(planUid, options);
|
|
1221
|
-
const query =
|
|
1588
|
+
const query = useQuery(queryOptions);
|
|
1222
1589
|
query.queryKey = queryOptions.queryKey;
|
|
1223
1590
|
return query;
|
|
1224
1591
|
}
|
|
@@ -1241,7 +1608,7 @@ var getPlanUpdatePlanMutationOptions = (options) => {
|
|
|
1241
1608
|
};
|
|
1242
1609
|
var usePlanUpdatePlan = (options) => {
|
|
1243
1610
|
const mutationOptions = getPlanUpdatePlanMutationOptions(options);
|
|
1244
|
-
return
|
|
1611
|
+
return useMutation(mutationOptions);
|
|
1245
1612
|
};
|
|
1246
1613
|
var planDeletePlan = (planUid, options) => {
|
|
1247
1614
|
return customFetch({
|
|
@@ -1261,7 +1628,7 @@ var getPlanDeletePlanMutationOptions = (options) => {
|
|
|
1261
1628
|
};
|
|
1262
1629
|
var usePlanDeletePlan = (options) => {
|
|
1263
1630
|
const mutationOptions = getPlanDeletePlanMutationOptions(options);
|
|
1264
|
-
return
|
|
1631
|
+
return useMutation(mutationOptions);
|
|
1265
1632
|
};
|
|
1266
1633
|
var planFamilyGetAllPlanFamilies = (options, signal) => {
|
|
1267
1634
|
return customFetch({
|
|
@@ -1283,7 +1650,7 @@ var getPlanFamilyGetAllPlanFamiliesQueryOptions = (options) => {
|
|
|
1283
1650
|
};
|
|
1284
1651
|
function usePlanFamilyGetAllPlanFamilies(options) {
|
|
1285
1652
|
const queryOptions = getPlanFamilyGetAllPlanFamiliesQueryOptions(options);
|
|
1286
|
-
const query =
|
|
1653
|
+
const query = useQuery(queryOptions);
|
|
1287
1654
|
query.queryKey = queryOptions.queryKey;
|
|
1288
1655
|
return query;
|
|
1289
1656
|
}
|
|
@@ -1307,7 +1674,7 @@ var getPlanFamilyAddPlanFamilyMutationOptions = (options) => {
|
|
|
1307
1674
|
};
|
|
1308
1675
|
var usePlanFamilyAddPlanFamily = (options) => {
|
|
1309
1676
|
const mutationOptions = getPlanFamilyAddPlanFamilyMutationOptions(options);
|
|
1310
|
-
return
|
|
1677
|
+
return useMutation(mutationOptions);
|
|
1311
1678
|
};
|
|
1312
1679
|
var planFamilyGetPlanFamily = (planFamilyUid, options, signal) => {
|
|
1313
1680
|
return customFetch({
|
|
@@ -1329,7 +1696,7 @@ var getPlanFamilyGetPlanFamilyQueryOptions = (planFamilyUid, options) => {
|
|
|
1329
1696
|
};
|
|
1330
1697
|
function usePlanFamilyGetPlanFamily(planFamilyUid, options) {
|
|
1331
1698
|
const queryOptions = getPlanFamilyGetPlanFamilyQueryOptions(planFamilyUid, options);
|
|
1332
|
-
const query =
|
|
1699
|
+
const query = useQuery(queryOptions);
|
|
1333
1700
|
query.queryKey = queryOptions.queryKey;
|
|
1334
1701
|
return query;
|
|
1335
1702
|
}
|
|
@@ -1352,7 +1719,7 @@ var getPlanFamilyUpdatePlanFamilyMutationOptions = (options) => {
|
|
|
1352
1719
|
};
|
|
1353
1720
|
var usePlanFamilyUpdatePlanFamily = (options) => {
|
|
1354
1721
|
const mutationOptions = getPlanFamilyUpdatePlanFamilyMutationOptions(options);
|
|
1355
|
-
return
|
|
1722
|
+
return useMutation(mutationOptions);
|
|
1356
1723
|
};
|
|
1357
1724
|
var planFamilyDeletePlanFamily = (planFamilyUid, options) => {
|
|
1358
1725
|
return customFetch({
|
|
@@ -1372,13 +1739,9 @@ var getPlanFamilyDeletePlanFamilyMutationOptions = (options) => {
|
|
|
1372
1739
|
};
|
|
1373
1740
|
var usePlanFamilyDeletePlanFamily = (options) => {
|
|
1374
1741
|
const mutationOptions = getPlanFamilyDeletePlanFamilyMutationOptions(options);
|
|
1375
|
-
return
|
|
1742
|
+
return useMutation(mutationOptions);
|
|
1376
1743
|
};
|
|
1377
1744
|
// src/generated/crm/crm.ts
|
|
1378
|
-
import {
|
|
1379
|
-
useMutation as useMutation3,
|
|
1380
|
-
useQuery as useQuery3
|
|
1381
|
-
} from "@tanstack/react-query";
|
|
1382
1745
|
var dealGetAllDeals = (params, options, signal) => {
|
|
1383
1746
|
return customFetch({
|
|
1384
1747
|
url: `/api/v1/crm/deals`,
|
|
@@ -1401,7 +1764,7 @@ var getDealGetAllDealsQueryOptions = (params, options) => {
|
|
|
1401
1764
|
};
|
|
1402
1765
|
function useDealGetAllDeals(params, options) {
|
|
1403
1766
|
const queryOptions = getDealGetAllDealsQueryOptions(params, options);
|
|
1404
|
-
const query =
|
|
1767
|
+
const query = useQuery(queryOptions);
|
|
1405
1768
|
query.queryKey = queryOptions.queryKey;
|
|
1406
1769
|
return query;
|
|
1407
1770
|
}
|
|
@@ -1425,7 +1788,7 @@ var getDealAddDealMutationOptions = (options) => {
|
|
|
1425
1788
|
};
|
|
1426
1789
|
var useDealAddDeal = (options) => {
|
|
1427
1790
|
const mutationOptions = getDealAddDealMutationOptions(options);
|
|
1428
|
-
return
|
|
1791
|
+
return useMutation(mutationOptions);
|
|
1429
1792
|
};
|
|
1430
1793
|
var dealGetDeal = (dealUid, options, signal) => {
|
|
1431
1794
|
return customFetch({
|
|
@@ -1447,7 +1810,7 @@ var getDealGetDealQueryOptions = (dealUid, options) => {
|
|
|
1447
1810
|
};
|
|
1448
1811
|
function useDealGetDeal(dealUid, options) {
|
|
1449
1812
|
const queryOptions = getDealGetDealQueryOptions(dealUid, options);
|
|
1450
|
-
const query =
|
|
1813
|
+
const query = useQuery(queryOptions);
|
|
1451
1814
|
query.queryKey = queryOptions.queryKey;
|
|
1452
1815
|
return query;
|
|
1453
1816
|
}
|
|
@@ -1470,7 +1833,7 @@ var getDealUpdateDealMutationOptions = (options) => {
|
|
|
1470
1833
|
};
|
|
1471
1834
|
var useDealUpdateDeal = (options) => {
|
|
1472
1835
|
const mutationOptions = getDealUpdateDealMutationOptions(options);
|
|
1473
|
-
return
|
|
1836
|
+
return useMutation(mutationOptions);
|
|
1474
1837
|
};
|
|
1475
1838
|
var dealDeleteDeal = (dealUid, options) => {
|
|
1476
1839
|
return customFetch({
|
|
@@ -1490,7 +1853,7 @@ var getDealDeleteDealMutationOptions = (options) => {
|
|
|
1490
1853
|
};
|
|
1491
1854
|
var useDealDeleteDeal = (options) => {
|
|
1492
1855
|
const mutationOptions = getDealDeleteDealMutationOptions(options);
|
|
1493
|
-
return
|
|
1856
|
+
return useMutation(mutationOptions);
|
|
1494
1857
|
};
|
|
1495
1858
|
var registrationRegisterAccount = (account, options, signal) => {
|
|
1496
1859
|
return customFetch({
|
|
@@ -1512,7 +1875,7 @@ var getRegistrationRegisterAccountMutationOptions = (options) => {
|
|
|
1512
1875
|
};
|
|
1513
1876
|
var useRegistrationRegisterAccount = (options) => {
|
|
1514
1877
|
const mutationOptions = getRegistrationRegisterAccountMutationOptions(options);
|
|
1515
|
-
return
|
|
1878
|
+
return useMutation(mutationOptions);
|
|
1516
1879
|
};
|
|
1517
1880
|
var accountGetAllAccounts = (params, options, signal) => {
|
|
1518
1881
|
return customFetch({
|
|
@@ -1536,7 +1899,7 @@ var getAccountGetAllAccountsQueryOptions = (params, options) => {
|
|
|
1536
1899
|
};
|
|
1537
1900
|
function useAccountGetAllAccounts(params, options) {
|
|
1538
1901
|
const queryOptions = getAccountGetAllAccountsQueryOptions(params, options);
|
|
1539
|
-
const query =
|
|
1902
|
+
const query = useQuery(queryOptions);
|
|
1540
1903
|
query.queryKey = queryOptions.queryKey;
|
|
1541
1904
|
return query;
|
|
1542
1905
|
}
|
|
@@ -1562,7 +1925,7 @@ var getAccountAddAccountMutationOptions = (options) => {
|
|
|
1562
1925
|
};
|
|
1563
1926
|
var useAccountAddAccount = (options) => {
|
|
1564
1927
|
const mutationOptions = getAccountAddAccountMutationOptions(options);
|
|
1565
|
-
return
|
|
1928
|
+
return useMutation(mutationOptions);
|
|
1566
1929
|
};
|
|
1567
1930
|
var accountGetAccount = (accountUid, options, signal) => {
|
|
1568
1931
|
return customFetch({
|
|
@@ -1584,7 +1947,7 @@ var getAccountGetAccountQueryOptions = (accountUid, options) => {
|
|
|
1584
1947
|
};
|
|
1585
1948
|
function useAccountGetAccount(accountUid, options) {
|
|
1586
1949
|
const queryOptions = getAccountGetAccountQueryOptions(accountUid, options);
|
|
1587
|
-
const query =
|
|
1950
|
+
const query = useQuery(queryOptions);
|
|
1588
1951
|
query.queryKey = queryOptions.queryKey;
|
|
1589
1952
|
return query;
|
|
1590
1953
|
}
|
|
@@ -1606,7 +1969,7 @@ var getAccountDeleteAccountMutationOptions = (options) => {
|
|
|
1606
1969
|
};
|
|
1607
1970
|
var useAccountDeleteAccount = (options) => {
|
|
1608
1971
|
const mutationOptions = getAccountDeleteAccountMutationOptions(options);
|
|
1609
|
-
return
|
|
1972
|
+
return useMutation(mutationOptions);
|
|
1610
1973
|
};
|
|
1611
1974
|
var accountUpdateAccount = (accountUid, accountUpdateAccountBody, options) => {
|
|
1612
1975
|
return customFetch({
|
|
@@ -1627,7 +1990,7 @@ var getAccountUpdateAccountMutationOptions = (options) => {
|
|
|
1627
1990
|
};
|
|
1628
1991
|
var useAccountUpdateAccount = (options) => {
|
|
1629
1992
|
const mutationOptions = getAccountUpdateAccountMutationOptions(options);
|
|
1630
|
-
return
|
|
1993
|
+
return useMutation(mutationOptions);
|
|
1631
1994
|
};
|
|
1632
1995
|
var accountAddPersonToAccount = (accountUid, accountAddPersonToAccountBody, options, signal) => {
|
|
1633
1996
|
return customFetch({
|
|
@@ -1649,7 +2012,7 @@ var getAccountAddPersonToAccountMutationOptions = (options) => {
|
|
|
1649
2012
|
};
|
|
1650
2013
|
var useAccountAddPersonToAccount = (options) => {
|
|
1651
2014
|
const mutationOptions = getAccountAddPersonToAccountMutationOptions(options);
|
|
1652
|
-
return
|
|
2015
|
+
return useMutation(mutationOptions);
|
|
1653
2016
|
};
|
|
1654
2017
|
var accountUpdateMembership = (accountUid, membershipUid, accountUpdateMembershipBody, options) => {
|
|
1655
2018
|
return customFetch({
|
|
@@ -1671,7 +2034,7 @@ var getAccountUpdateMembershipMutationOptions = (options) => {
|
|
|
1671
2034
|
};
|
|
1672
2035
|
var useAccountUpdateMembership = (options) => {
|
|
1673
2036
|
const mutationOptions = getAccountUpdateMembershipMutationOptions(options);
|
|
1674
|
-
return
|
|
2037
|
+
return useMutation(mutationOptions);
|
|
1675
2038
|
};
|
|
1676
2039
|
var accountDeleteMembership = (accountUid, membershipUid, options) => {
|
|
1677
2040
|
return customFetch({
|
|
@@ -1691,7 +2054,7 @@ var getAccountDeleteMembershipMutationOptions = (options) => {
|
|
|
1691
2054
|
};
|
|
1692
2055
|
var useAccountDeleteMembership = (options) => {
|
|
1693
2056
|
const mutationOptions = getAccountDeleteMembershipMutationOptions(options);
|
|
1694
|
-
return
|
|
2057
|
+
return useMutation(mutationOptions);
|
|
1695
2058
|
};
|
|
1696
2059
|
var accountCancelAccount = (accountUid, accountCancelAccountBody, options) => {
|
|
1697
2060
|
return customFetch({
|
|
@@ -1713,7 +2076,7 @@ var getAccountCancelAccountMutationOptions = (options) => {
|
|
|
1713
2076
|
};
|
|
1714
2077
|
var useAccountCancelAccount = (options) => {
|
|
1715
2078
|
const mutationOptions = getAccountCancelAccountMutationOptions(options);
|
|
1716
|
-
return
|
|
2079
|
+
return useMutation(mutationOptions);
|
|
1717
2080
|
};
|
|
1718
2081
|
var accountRemoveCancellation = (accountUid, options) => {
|
|
1719
2082
|
return customFetch({
|
|
@@ -1733,7 +2096,7 @@ var getAccountRemoveCancellationMutationOptions = (options) => {
|
|
|
1733
2096
|
};
|
|
1734
2097
|
var useAccountRemoveCancellation = (options) => {
|
|
1735
2098
|
const mutationOptions = getAccountRemoveCancellationMutationOptions(options);
|
|
1736
|
-
return
|
|
2099
|
+
return useMutation(mutationOptions);
|
|
1737
2100
|
};
|
|
1738
2101
|
var accountExtendTrial = (accountUid, accountExtendTrialBody, options) => {
|
|
1739
2102
|
return customFetch({
|
|
@@ -1755,7 +2118,7 @@ var getAccountExtendTrialMutationOptions = (options) => {
|
|
|
1755
2118
|
};
|
|
1756
2119
|
var useAccountExtendTrial = (options) => {
|
|
1757
2120
|
const mutationOptions = getAccountExtendTrialMutationOptions(options);
|
|
1758
|
-
return
|
|
2121
|
+
return useMutation(mutationOptions);
|
|
1759
2122
|
};
|
|
1760
2123
|
var accountSendConfirmationEmail = (accountUid, options) => {
|
|
1761
2124
|
return customFetch({
|
|
@@ -1775,7 +2138,7 @@ var getAccountSendConfirmationEmailMutationOptions = (options) => {
|
|
|
1775
2138
|
};
|
|
1776
2139
|
var useAccountSendConfirmationEmail = (options) => {
|
|
1777
2140
|
const mutationOptions = getAccountSendConfirmationEmailMutationOptions(options);
|
|
1778
|
-
return
|
|
2141
|
+
return useMutation(mutationOptions);
|
|
1779
2142
|
};
|
|
1780
2143
|
var personGetAllPeople = (params, options, signal) => {
|
|
1781
2144
|
return customFetch({
|
|
@@ -1799,7 +2162,7 @@ var getPersonGetAllPeopleQueryOptions = (params, options) => {
|
|
|
1799
2162
|
};
|
|
1800
2163
|
function usePersonGetAllPeople(params, options) {
|
|
1801
2164
|
const queryOptions = getPersonGetAllPeopleQueryOptions(params, options);
|
|
1802
|
-
const query =
|
|
2165
|
+
const query = useQuery(queryOptions);
|
|
1803
2166
|
query.queryKey = queryOptions.queryKey;
|
|
1804
2167
|
return query;
|
|
1805
2168
|
}
|
|
@@ -1823,7 +2186,7 @@ var getPersonAddPersonMutationOptions = (options) => {
|
|
|
1823
2186
|
};
|
|
1824
2187
|
var usePersonAddPerson = (options) => {
|
|
1825
2188
|
const mutationOptions = getPersonAddPersonMutationOptions(options);
|
|
1826
|
-
return
|
|
2189
|
+
return useMutation(mutationOptions);
|
|
1827
2190
|
};
|
|
1828
2191
|
var personGetPerson = (personUid, options, signal) => {
|
|
1829
2192
|
return customFetch({
|
|
@@ -1845,7 +2208,7 @@ var getPersonGetPersonQueryOptions = (personUid, options) => {
|
|
|
1845
2208
|
};
|
|
1846
2209
|
function usePersonGetPerson(personUid, options) {
|
|
1847
2210
|
const queryOptions = getPersonGetPersonQueryOptions(personUid, options);
|
|
1848
|
-
const query =
|
|
2211
|
+
const query = useQuery(queryOptions);
|
|
1849
2212
|
query.queryKey = queryOptions.queryKey;
|
|
1850
2213
|
return query;
|
|
1851
2214
|
}
|
|
@@ -1868,7 +2231,7 @@ var getPersonUpdatePersonMutationOptions = (options) => {
|
|
|
1868
2231
|
};
|
|
1869
2232
|
var usePersonUpdatePerson = (options) => {
|
|
1870
2233
|
const mutationOptions = getPersonUpdatePersonMutationOptions(options);
|
|
1871
|
-
return
|
|
2234
|
+
return useMutation(mutationOptions);
|
|
1872
2235
|
};
|
|
1873
2236
|
var personDeletePerson = (personUid, options) => {
|
|
1874
2237
|
return customFetch({
|
|
@@ -1888,7 +2251,7 @@ var getPersonDeletePersonMutationOptions = (options) => {
|
|
|
1888
2251
|
};
|
|
1889
2252
|
var usePersonDeletePerson = (options) => {
|
|
1890
2253
|
const mutationOptions = getPersonDeletePersonMutationOptions(options);
|
|
1891
|
-
return
|
|
2254
|
+
return useMutation(mutationOptions);
|
|
1892
2255
|
};
|
|
1893
2256
|
var personSetTemporaryPassword = (personUid, personSetTemporaryPasswordBody, options) => {
|
|
1894
2257
|
return customFetch({
|
|
@@ -1910,7 +2273,7 @@ var getPersonSetTemporaryPasswordMutationOptions = (options) => {
|
|
|
1910
2273
|
};
|
|
1911
2274
|
var usePersonSetTemporaryPassword = (options) => {
|
|
1912
2275
|
const mutationOptions = getPersonSetTemporaryPasswordMutationOptions(options);
|
|
1913
|
-
return
|
|
2276
|
+
return useMutation(mutationOptions);
|
|
1914
2277
|
};
|
|
1915
2278
|
var personRegenerateTwoFactorRecoveryCodes = (personUid, options) => {
|
|
1916
2279
|
return customFetch({
|
|
@@ -1930,7 +2293,7 @@ var getPersonRegenerateTwoFactorRecoveryCodesMutationOptions = (options) => {
|
|
|
1930
2293
|
};
|
|
1931
2294
|
var usePersonRegenerateTwoFactorRecoveryCodes = (options) => {
|
|
1932
2295
|
const mutationOptions = getPersonRegenerateTwoFactorRecoveryCodesMutationOptions(options);
|
|
1933
|
-
return
|
|
2296
|
+
return useMutation(mutationOptions);
|
|
1934
2297
|
};
|
|
1935
2298
|
var personForgotPassword = (personForgotPasswordBody, options, signal) => {
|
|
1936
2299
|
return customFetch({
|
|
@@ -1953,13 +2316,9 @@ var getPersonForgotPasswordMutationOptions = (options) => {
|
|
|
1953
2316
|
};
|
|
1954
2317
|
var usePersonForgotPassword = (options) => {
|
|
1955
2318
|
const mutationOptions = getPersonForgotPasswordMutationOptions(options);
|
|
1956
|
-
return
|
|
2319
|
+
return useMutation(mutationOptions);
|
|
1957
2320
|
};
|
|
1958
2321
|
// src/generated/email/email.ts
|
|
1959
|
-
import {
|
|
1960
|
-
useMutation as useMutation4,
|
|
1961
|
-
useQuery as useQuery4
|
|
1962
|
-
} from "@tanstack/react-query";
|
|
1963
2322
|
var campaignGetAllBroadcastEmails = (options, signal) => {
|
|
1964
2323
|
return customFetch({
|
|
1965
2324
|
url: `/api/v1/email/campaigns/broadcasts`,
|
|
@@ -1980,7 +2339,7 @@ var getCampaignGetAllBroadcastEmailsQueryOptions = (options) => {
|
|
|
1980
2339
|
};
|
|
1981
2340
|
function useCampaignGetAllBroadcastEmails(options) {
|
|
1982
2341
|
const queryOptions = getCampaignGetAllBroadcastEmailsQueryOptions(options);
|
|
1983
|
-
const query =
|
|
2342
|
+
const query = useQuery(queryOptions);
|
|
1984
2343
|
query.queryKey = queryOptions.queryKey;
|
|
1985
2344
|
return query;
|
|
1986
2345
|
}
|
|
@@ -2004,7 +2363,7 @@ var getCampaignAddBroadcastEmailMutationOptions = (options) => {
|
|
|
2004
2363
|
};
|
|
2005
2364
|
var useCampaignAddBroadcastEmail = (options) => {
|
|
2006
2365
|
const mutationOptions = getCampaignAddBroadcastEmailMutationOptions(options);
|
|
2007
|
-
return
|
|
2366
|
+
return useMutation(mutationOptions);
|
|
2008
2367
|
};
|
|
2009
2368
|
var campaignGetBroadcastEmail = (broadcastCampaignUid, options, signal) => {
|
|
2010
2369
|
return customFetch({
|
|
@@ -2026,7 +2385,7 @@ var getCampaignGetBroadcastEmailQueryOptions = (broadcastCampaignUid, options) =
|
|
|
2026
2385
|
};
|
|
2027
2386
|
function useCampaignGetBroadcastEmail(broadcastCampaignUid, options) {
|
|
2028
2387
|
const queryOptions = getCampaignGetBroadcastEmailQueryOptions(broadcastCampaignUid, options);
|
|
2029
|
-
const query =
|
|
2388
|
+
const query = useQuery(queryOptions);
|
|
2030
2389
|
query.queryKey = queryOptions.queryKey;
|
|
2031
2390
|
return query;
|
|
2032
2391
|
}
|
|
@@ -2049,7 +2408,7 @@ var getCampaignUpdateBroadcastEmailMutationOptions = (options) => {
|
|
|
2049
2408
|
};
|
|
2050
2409
|
var useCampaignUpdateBroadcastEmail = (options) => {
|
|
2051
2410
|
const mutationOptions = getCampaignUpdateBroadcastEmailMutationOptions(options);
|
|
2052
|
-
return
|
|
2411
|
+
return useMutation(mutationOptions);
|
|
2053
2412
|
};
|
|
2054
2413
|
var campaignDeleteBroadcastCampaign = (broadcastCampaignUid, options) => {
|
|
2055
2414
|
return customFetch({
|
|
@@ -2069,7 +2428,7 @@ var getCampaignDeleteBroadcastCampaignMutationOptions = (options) => {
|
|
|
2069
2428
|
};
|
|
2070
2429
|
var useCampaignDeleteBroadcastCampaign = (options) => {
|
|
2071
2430
|
const mutationOptions = getCampaignDeleteBroadcastCampaignMutationOptions(options);
|
|
2072
|
-
return
|
|
2431
|
+
return useMutation(mutationOptions);
|
|
2073
2432
|
};
|
|
2074
2433
|
var campaignUnscheduleBroadcastEmail = (broadcastCampaignUid, options, signal) => {
|
|
2075
2434
|
return customFetch({
|
|
@@ -2089,7 +2448,7 @@ var getCampaignUnscheduleBroadcastEmailMutationOptions = (options) => {
|
|
|
2089
2448
|
};
|
|
2090
2449
|
var useCampaignUnscheduleBroadcastEmail = (options) => {
|
|
2091
2450
|
const mutationOptions = getCampaignUnscheduleBroadcastEmailMutationOptions(options);
|
|
2092
|
-
return
|
|
2451
|
+
return useMutation(mutationOptions);
|
|
2093
2452
|
};
|
|
2094
2453
|
var campaignArchiveBroadcastCampaign = (broadcastCampaignUid, options, signal) => {
|
|
2095
2454
|
return customFetch({
|
|
@@ -2110,7 +2469,7 @@ var getCampaignArchiveBroadcastCampaignMutationOptions = (options) => {
|
|
|
2110
2469
|
};
|
|
2111
2470
|
var useCampaignArchiveBroadcastCampaign = (options) => {
|
|
2112
2471
|
const mutationOptions = getCampaignArchiveBroadcastCampaignMutationOptions(options);
|
|
2113
|
-
return
|
|
2472
|
+
return useMutation(mutationOptions);
|
|
2114
2473
|
};
|
|
2115
2474
|
var campaignSendTestCampaignEmail = (campaignSendTestCampaignEmailBody, options, signal) => {
|
|
2116
2475
|
return customFetch({
|
|
@@ -2133,7 +2492,7 @@ var getCampaignSendTestCampaignEmailMutationOptions = (options) => {
|
|
|
2133
2492
|
};
|
|
2134
2493
|
var useCampaignSendTestCampaignEmail = (options) => {
|
|
2135
2494
|
const mutationOptions = getCampaignSendTestCampaignEmailMutationOptions(options);
|
|
2136
|
-
return
|
|
2495
|
+
return useMutation(mutationOptions);
|
|
2137
2496
|
};
|
|
2138
2497
|
var emailListGetAllSubscriptions = (emailListUid, params, options, signal) => {
|
|
2139
2498
|
return customFetch({
|
|
@@ -2157,7 +2516,7 @@ var getEmailListGetAllSubscriptionsQueryOptions = (emailListUid, params, options
|
|
|
2157
2516
|
};
|
|
2158
2517
|
function useEmailListGetAllSubscriptions(emailListUid, params, options) {
|
|
2159
2518
|
const queryOptions = getEmailListGetAllSubscriptionsQueryOptions(emailListUid, params, options);
|
|
2160
|
-
const query =
|
|
2519
|
+
const query = useQuery(queryOptions);
|
|
2161
2520
|
query.queryKey = queryOptions.queryKey;
|
|
2162
2521
|
return query;
|
|
2163
2522
|
}
|
|
@@ -2181,7 +2540,7 @@ var getEmailListAddSubscriptionMutationOptions = (options) => {
|
|
|
2181
2540
|
};
|
|
2182
2541
|
var useEmailListAddSubscription = (options) => {
|
|
2183
2542
|
const mutationOptions = getEmailListAddSubscriptionMutationOptions(options);
|
|
2184
|
-
return
|
|
2543
|
+
return useMutation(mutationOptions);
|
|
2185
2544
|
};
|
|
2186
2545
|
var emailListDeleteSubscription = (emailListUid, subscriptionUid, options) => {
|
|
2187
2546
|
return customFetch({
|
|
@@ -2201,13 +2560,9 @@ var getEmailListDeleteSubscriptionMutationOptions = (options) => {
|
|
|
2201
2560
|
};
|
|
2202
2561
|
var useEmailListDeleteSubscription = (options) => {
|
|
2203
2562
|
const mutationOptions = getEmailListDeleteSubscriptionMutationOptions(options);
|
|
2204
|
-
return
|
|
2563
|
+
return useMutation(mutationOptions);
|
|
2205
2564
|
};
|
|
2206
2565
|
// src/generated/support/support.ts
|
|
2207
|
-
import {
|
|
2208
|
-
useMutation as useMutation5,
|
|
2209
|
-
useQuery as useQuery5
|
|
2210
|
-
} from "@tanstack/react-query";
|
|
2211
2566
|
var caseGetAllCases = (params, options, signal) => {
|
|
2212
2567
|
return customFetch({
|
|
2213
2568
|
url: `/api/v1/support/cases`,
|
|
@@ -2230,7 +2585,7 @@ var getCaseGetAllCasesQueryOptions = (params, options) => {
|
|
|
2230
2585
|
};
|
|
2231
2586
|
function useCaseGetAllCases(params, options) {
|
|
2232
2587
|
const queryOptions = getCaseGetAllCasesQueryOptions(params, options);
|
|
2233
|
-
const query =
|
|
2588
|
+
const query = useQuery(queryOptions);
|
|
2234
2589
|
query.queryKey = queryOptions.queryKey;
|
|
2235
2590
|
return query;
|
|
2236
2591
|
}
|
|
@@ -2255,7 +2610,7 @@ var getCaseAddCaseMutationOptions = (options) => {
|
|
|
2255
2610
|
};
|
|
2256
2611
|
var useCaseAddCase = (options) => {
|
|
2257
2612
|
const mutationOptions = getCaseAddCaseMutationOptions(options);
|
|
2258
|
-
return
|
|
2613
|
+
return useMutation(mutationOptions);
|
|
2259
2614
|
};
|
|
2260
2615
|
var caseGetCase = (caseUid, options, signal) => {
|
|
2261
2616
|
return customFetch({
|
|
@@ -2277,7 +2632,7 @@ var getCaseGetCaseQueryOptions = (caseUid, options) => {
|
|
|
2277
2632
|
};
|
|
2278
2633
|
function useCaseGetCase(caseUid, options) {
|
|
2279
2634
|
const queryOptions = getCaseGetCaseQueryOptions(caseUid, options);
|
|
2280
|
-
const query =
|
|
2635
|
+
const query = useQuery(queryOptions);
|
|
2281
2636
|
query.queryKey = queryOptions.queryKey;
|
|
2282
2637
|
return query;
|
|
2283
2638
|
}
|
|
@@ -2300,7 +2655,7 @@ var getCaseAddReplyMutationOptions = (options) => {
|
|
|
2300
2655
|
};
|
|
2301
2656
|
var useCaseAddReply = (options) => {
|
|
2302
2657
|
const mutationOptions = getCaseAddReplyMutationOptions(options);
|
|
2303
|
-
return
|
|
2658
|
+
return useMutation(mutationOptions);
|
|
2304
2659
|
};
|
|
2305
2660
|
var caseAddClientResponse = (caseUid, comment, options, signal) => {
|
|
2306
2661
|
return customFetch({
|
|
@@ -2320,7 +2675,7 @@ var getCaseAddClientResponseMutationOptions = (options) => {
|
|
|
2320
2675
|
};
|
|
2321
2676
|
var useCaseAddClientResponse = (options) => {
|
|
2322
2677
|
const mutationOptions = getCaseAddClientResponseMutationOptions(options);
|
|
2323
|
-
return
|
|
2678
|
+
return useMutation(mutationOptions);
|
|
2324
2679
|
};
|
|
2325
2680
|
var articleGetAllArticles = (params, options, signal) => {
|
|
2326
2681
|
return customFetch({
|
|
@@ -2344,7 +2699,7 @@ var getArticleGetAllArticlesQueryOptions = (params, options) => {
|
|
|
2344
2699
|
};
|
|
2345
2700
|
function useArticleGetAllArticles(params, options) {
|
|
2346
2701
|
const queryOptions = getArticleGetAllArticlesQueryOptions(params, options);
|
|
2347
|
-
const query =
|
|
2702
|
+
const query = useQuery(queryOptions);
|
|
2348
2703
|
query.queryKey = queryOptions.queryKey;
|
|
2349
2704
|
return query;
|
|
2350
2705
|
}
|
|
@@ -2368,7 +2723,7 @@ var getArticleGetArticleQueryOptions = (articleUid, options) => {
|
|
|
2368
2723
|
};
|
|
2369
2724
|
function useArticleGetArticle(articleUid, options) {
|
|
2370
2725
|
const queryOptions = getArticleGetArticleQueryOptions(articleUid, options);
|
|
2371
|
-
const query =
|
|
2726
|
+
const query = useQuery(queryOptions);
|
|
2372
2727
|
query.queryKey = queryOptions.queryKey;
|
|
2373
2728
|
return query;
|
|
2374
2729
|
}
|
|
@@ -2392,7 +2747,7 @@ var getCategoryGetAllCategoriesQueryOptions = (options) => {
|
|
|
2392
2747
|
};
|
|
2393
2748
|
function useCategoryGetAllCategories(options) {
|
|
2394
2749
|
const queryOptions = getCategoryGetAllCategoriesQueryOptions(options);
|
|
2395
|
-
const query =
|
|
2750
|
+
const query = useQuery(queryOptions);
|
|
2396
2751
|
query.queryKey = queryOptions.queryKey;
|
|
2397
2752
|
return query;
|
|
2398
2753
|
}
|
|
@@ -3105,17 +3460,21 @@ export {
|
|
|
3105
3460
|
UpgradeCta,
|
|
3106
3461
|
TaskStatus,
|
|
3107
3462
|
TagColor,
|
|
3463
|
+
SupportEmbed,
|
|
3108
3464
|
SupportCaseStatus,
|
|
3109
3465
|
SupportCaseSource,
|
|
3110
3466
|
SupportCaseHistoryType,
|
|
3467
|
+
SupportButton,
|
|
3111
3468
|
SupportArticleStatus,
|
|
3112
3469
|
SpamStatus,
|
|
3470
|
+
SignupButton,
|
|
3113
3471
|
RegistrationField,
|
|
3114
3472
|
QcountStatus,
|
|
3115
3473
|
QcountConfigSettingType,
|
|
3116
3474
|
PurchaseAddonButton,
|
|
3117
3475
|
ProtectedRoute,
|
|
3118
3476
|
ProfileEmbed,
|
|
3477
|
+
ProfileButton,
|
|
3119
3478
|
PersonSegmentRemovedWebhookPayloadOAuthIntegrationStatus,
|
|
3120
3479
|
PersonSegmentRemovedWebhookPayloadEmailListPersonItemEmailListSubscriberStatus,
|
|
3121
3480
|
PersonSegmentRemovedWebhookPayloadAccountAccountStage,
|
|
@@ -3127,9 +3486,15 @@ export {
|
|
|
3127
3486
|
OutsetaProvider,
|
|
3128
3487
|
OAuthService,
|
|
3129
3488
|
LogoutButton,
|
|
3489
|
+
LoginButton,
|
|
3130
3490
|
LineItemType,
|
|
3491
|
+
LeadCaptureEmbed,
|
|
3492
|
+
LeadCaptureButton,
|
|
3131
3493
|
EntityType,
|
|
3132
3494
|
EmailListSubscriberStatus,
|
|
3495
|
+
EmailListForm,
|
|
3496
|
+
EmailListEmbed,
|
|
3497
|
+
EmailListButton,
|
|
3133
3498
|
DeserializationStatus,
|
|
3134
3499
|
DatabaseType,
|
|
3135
3500
|
ContentGroupItemMatchMode,
|
|
@@ -3145,6 +3510,7 @@ export {
|
|
|
3145
3510
|
BackGroundTaskType,
|
|
3146
3511
|
AuthEmbed,
|
|
3147
3512
|
AuthCta,
|
|
3513
|
+
AuthButton,
|
|
3148
3514
|
ApiKeyType,
|
|
3149
3515
|
ActivityType,
|
|
3150
3516
|
AccountStage,
|