@01.software/sdk 0.65.1 → 0.67.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/CHANGELOG.md +68 -0
- package/README.md +79 -2
- package/dist/client.cjs +79 -27
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +79 -27
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-C2sMvfme.d.ts → collection-client-D4HEOoO_.d.ts} +4 -4
- package/dist/{collection-client-B7rsTtVj.d.cts → collection-client-jrNFGbrO.d.cts} +4 -4
- package/dist/{const-CRxPTDGt.d.ts → const-BU79hCFB.d.ts} +2 -2
- package/dist/{const-D6ZRQLxI.d.cts → const-CCQ3MdLE.d.cts} +2 -2
- package/dist/{index-1auUEYrl.d.ts → index-CwKxWHIa.d.ts} +3 -3
- package/dist/{index-Bbpf5t-l.d.cts → index-DiyhsVHd.d.cts} +3 -3
- package/dist/index.cjs +80 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +80 -27
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BnIET0xU.d.cts → payload-types-jdsUXunB.d.cts} +128 -49
- package/dist/{payload-types-BnIET0xU.d.ts → payload-types-jdsUXunB.d.ts} +128 -49
- package/dist/query.cjs +14 -1
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +14 -1
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +96 -3
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.js +96 -3
- package/dist/server.js.map +1 -1
- package/dist/{types-Dp1oYpD3.d.cts → types-BPwXAFZ7.d.cts} +2 -2
- package/dist/{types-D1y4TgQm.d.ts → types-BusejG-v.d.ts} +2 -2
- package/dist/{types-Dzn0LD2N.d.cts → types-CvdBV3ri.d.cts} +71 -6
- package/dist/{types-DnRC3nLG.d.ts → types-I2k6Laad.d.ts} +71 -6
- package/dist/ui/canvas.cjs +5 -1
- package/dist/ui/canvas.cjs.map +1 -1
- package/dist/ui/canvas.js +5 -1
- package/dist/ui/canvas.js.map +1 -1
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.cjs +9 -2
- package/dist/ui/video.cjs.map +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/ui/video.js +9 -2
- package/dist/ui/video.js.map +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
# @01.software/sdk
|
|
2
2
|
|
|
3
|
+
## 0.67.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 79bec7b: Add events.listMyRegistrations() for paginated customer-authenticated event registration history with a PII-free DTO.
|
|
8
|
+
|
|
9
|
+
BREAKING (0.x minor): `createServerClient().events` now returns an object facade instead of an `EventsClient` instance, excluding the customer-only `listMyRegistrations` method. The existing `getRange`, `getAdmissionAvailability`, `register`, `getGuestRegistration`, and `cancelGuestRegistration` calls remain supported. Consumers that accept server event helpers should import `RootServerClientWithEvents` from `@01.software/sdk/server` and use `RootServerClientWithEvents['events']` instead of `EventsClient`. Replace `instanceof EventsClient` checks with checks for the methods they need (for example, `typeof events.getRange === 'function'`). For customer registration history in a server BFF, create a request-scoped `createClient({ publishableKey, customer: { persist: false, token } })`.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 6d58a9c: Fix compiled Canvas template nodes with transparent backgrounds so their slug scope and transparent background classes remain separate tokens.
|
|
14
|
+
- 40d78bd: Sync generated types for the optional, operator-only virtual adminTitle on commerce config and tenant metadata. Storefront metadata reads and persisted fields are unchanged.
|
|
15
|
+
|
|
16
|
+
Private singleton titles are omitted from publishable-key, customer, and service-credential responses, including requests with a coincident Console session. They use the response document's tenant authority. GraphQL returns null when this denied optional field is explicitly selected.
|
|
17
|
+
|
|
18
|
+
- 5662849: Clarify the generated Link clickCount documentation: the field is read-only, and Console does not currently collect clicks automatically. Stored fields and access rules are unchanged.
|
|
19
|
+
|
|
20
|
+
## 0.66.6
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 0599ab4: 기존 CustomerAuth 요청의 path/method를 공통 HTTP manifest에 연결합니다. 등록·로그인·refresh·profile·password 요청의 body, 인증, 응답 및 세션 동작은 유지합니다.
|
|
25
|
+
|
|
26
|
+
## 0.66.5
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 604f443: Refresh generated community ban types to match the Admin Panel field order and temporary expiry guidance. The field types and API behavior are unchanged.
|
|
31
|
+
|
|
32
|
+
## 0.66.4
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- ed09398: Clarify that a blank sender display name uses the workspace name for commerce and event notifications, and document the hosted sign-in logo URL fallback.
|
|
37
|
+
- c7b8803: Regenerate membership plan Payload declarations to match the Admin Panel's basic information field order. Field names, types, and fallback semantics are unchanged.
|
|
38
|
+
- e879ec4: Update generated type documentation comments to call the account boundary a workspace in English descriptions. Type names, field names, collection slugs, and runtime behavior are unchanged.
|
|
39
|
+
|
|
40
|
+
## 0.66.3
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 35568b4: Map stored video aspect-ratio enums to valid CSS ratios for VideoPlayer placeholders and ready players, preserving the 16/9 default and explicit style overrides. A stored ratio is now a valid inline `aspect-ratio`, so it takes precedence over an aspect ratio set through `className`; use `style.aspectRatio` or `placeholderStyle.aspectRatio` to override it.
|
|
45
|
+
|
|
46
|
+
## 0.66.2
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- 055cb8d: Synchronize generated internal payment-account types with optional Commerce market assignments. Account management remains SDK-internal; this adds no public payment API.
|
|
51
|
+
|
|
52
|
+
## 0.66.1
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- 8abfca5: Clarify that live-stream counters expose stored values and are not automatically aggregated by Console.
|
|
57
|
+
- 167f186: Clarify generated customer address field guidance comments.
|
|
58
|
+
|
|
59
|
+
## 0.66.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- 29f068e: Add server-only `commerce.product.graphRevision` and `updateVariantPrices` for updating existing variant base prices without submitting the complete product graph. Keep one explicit content locale while reading the baseline, reviewing current values, writing, and independently reading back. Conflicts require a fresh review; the helper does not retry, refresh the revision, or fall back to upsert. Stock, deletes, options, and market prices are excluded. Existing PATCH receipts, projection warnings, and conflict metadata remain available.
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- fbb0715: Add optional closed-month observation quality metadata to the generated internal usage snapshot type.
|
|
68
|
+
- 62d1c63: Classify platform billing consent receipts as an internal Console collection.
|
|
69
|
+
- a9ca714: Synchronize generated usage invoice types with the private, transition-gated precharge notice protocol fields.
|
|
70
|
+
|
|
3
71
|
## 0.65.1
|
|
4
72
|
|
|
5
73
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -96,6 +96,12 @@ monthly allowance is exhausted or 503 when admission cannot be verified.
|
|
|
96
96
|
legacy public-ID paths for unmigrated paid assets. A signed asset's retained
|
|
97
97
|
`muxPlaybackId` is historical usage evidence and is not a playable URL.
|
|
98
98
|
|
|
99
|
+
`VideoPlayer` displays the stored `aspectRatio` values `16_9`, `9_16`,
|
|
100
|
+
`4_3`, and `1_1` as CSS ratios in both the placeholder and ready player.
|
|
101
|
+
An unset ratio defaults to `16/9`. Override the ready player with
|
|
102
|
+
`style.aspectRatio`, or the placeholder with `placeholderStyle.aspectRatio`;
|
|
103
|
+
each override applies only to its own rendering path.
|
|
104
|
+
|
|
99
105
|
`CanvasRenderer` renders reserved `shape` nodes (`terminator`, `process`,
|
|
100
106
|
`decision`, `io`, `subprocess`) with first-party SVG geometry, without a tenant
|
|
101
107
|
catalog row or QuickJS template.
|
|
@@ -751,6 +757,10 @@ const prepared = await server.memberships.subscribe({
|
|
|
751
757
|
})
|
|
752
758
|
|
|
753
759
|
if (prepared.status === 'incomplete') {
|
|
760
|
+
const expiresAt = Date.parse(prepared.firstCharge.expiresAt)
|
|
761
|
+
if (!Number.isFinite(expiresAt) || Date.now() >= expiresAt) {
|
|
762
|
+
throw new Error('First charge instruction expired or invalid')
|
|
763
|
+
}
|
|
754
764
|
await tenantPsp.charge({
|
|
755
765
|
idempotencyKey: prepared.firstCharge.idempotencyKey,
|
|
756
766
|
amount: prepared.firstCharge.amount,
|
|
@@ -767,8 +777,8 @@ posts the signed outcome through the configured charge-result webhook. A trial
|
|
|
767
777
|
response is immediately `trialing` and has no `firstCharge` field. Before a paid
|
|
768
778
|
subscribe, configure an active delegated billing connection for
|
|
769
779
|
the tenant; otherwise Console returns `409 conflict` without lifecycle writes.
|
|
770
|
-
Do not start
|
|
771
|
-
|
|
780
|
+
Do not start the PSP payment if `expiresAt` is invalid or the current time is
|
|
781
|
+
at or after it; deduplicate PSP work with
|
|
772
782
|
`firstCharge.idempotencyKey`. A late paid result remains evidence but cannot
|
|
773
783
|
activate the Membership, so the tenant handles any refund outside this API. Replays use
|
|
774
784
|
the same plan, price, customer reference, and idempotency key while the first
|
|
@@ -1869,6 +1879,55 @@ options, option values, and variants. It is the tenant-admin safe path because
|
|
|
1869
1879
|
it applies the product/option/variant transaction that raw collection writes do
|
|
1870
1880
|
not provide.
|
|
1871
1881
|
|
|
1882
|
+
For an existing variant's **base price only**, use the server-only narrow helper:
|
|
1883
|
+
|
|
1884
|
+
```typescript
|
|
1885
|
+
const locale = 'ko'
|
|
1886
|
+
const baseline = await server.commerce.product.graphRevision({
|
|
1887
|
+
productId,
|
|
1888
|
+
locale,
|
|
1889
|
+
})
|
|
1890
|
+
// Review current base prices after taking the baseline, in the same locale.
|
|
1891
|
+
const current = await server.collections.from('product-variants').find({
|
|
1892
|
+
where: { product: { equals: productId } },
|
|
1893
|
+
locale,
|
|
1894
|
+
})
|
|
1895
|
+
const variantId = current.docs[0].id
|
|
1896
|
+
const saved = await server.commerce.product.updateVariantPrices({
|
|
1897
|
+
productId,
|
|
1898
|
+
locale,
|
|
1899
|
+
graphRevision: baseline.graphRevision,
|
|
1900
|
+
updates: [{ id: variantId, price: 1250 }],
|
|
1901
|
+
})
|
|
1902
|
+
// Independent readback; this does not replace the revision of an older draft.
|
|
1903
|
+
const readback = await server.collections
|
|
1904
|
+
.from('product-variants')
|
|
1905
|
+
.findById(variantId, { locale })
|
|
1906
|
+
if (saved.productProjectionStale) {
|
|
1907
|
+
console.warn('Prices saved; product listing projection may still be stale.')
|
|
1908
|
+
}
|
|
1909
|
+
```
|
|
1910
|
+
|
|
1911
|
+
`graphRevision()` returns only `{ productId, graphRevision }` from a private,
|
|
1912
|
+
no-store server read. `updateVariantPrices()` sends only the supplied existing
|
|
1913
|
+
rows to the variants PATCH and returns its `ok`, `productId`, `updated`,
|
|
1914
|
+
`deleted`, and `productProjectionStale` fields unchanged. It accepts 1–250
|
|
1915
|
+
`{ id, price }` rows; price uses the existing numeric shop-currency amount,
|
|
1916
|
+
with currency precision enforced by Console. Stock, deletions, option changes,
|
|
1917
|
+
compare-at prices, and market prices are rejected as SDK inputs. They are not
|
|
1918
|
+
silently stripped or sent. Full graph upsert remains a separate operation.
|
|
1919
|
+
|
|
1920
|
+
Use the same explicit enabled content `locale` (`ko` or `en`) for baseline,
|
|
1921
|
+
value review, save, and readback. A `409 graph_conflict` requires reviewing fresh
|
|
1922
|
+
values before a deliberate new edit; the SDK never fetches a replacement
|
|
1923
|
+
revision, retries the PATCH, or falls back to upsert. The existing conflict
|
|
1924
|
+
fields remain at `SDKError.details.body.currentGraphRevision` and
|
|
1925
|
+
`SDKError.details.body.currentGraphUpdatedAt`, together with
|
|
1926
|
+
`apiReason` and `requestId`. Read-only service keys can read the revision but
|
|
1927
|
+
cannot change prices; operator/PAT tenant roles and tenant pinning still apply.
|
|
1928
|
+
A saved projection warning reports committed graph data, not a failed save or
|
|
1929
|
+
permission to repeat the write.
|
|
1930
|
+
|
|
1872
1931
|
`commerce.product.upsert()` is a graph-write API. For Console product
|
|
1873
1932
|
documents, Payload saves product fields first; upsert receives `productId`,
|
|
1874
1933
|
`graphRevision` (required when updating an existing product via `productId` -
|
|
@@ -2046,6 +2105,24 @@ replacement API. Pass an empty list to clear codes. Singular `admission`,
|
|
|
2046
2105
|
Browser `mine()`/`merge({ guestCartToken })` derive customer identity from the
|
|
2047
2106
|
JWT; server calls require an explicit `customerToken`.
|
|
2048
2107
|
|
|
2108
|
+
### Customer event registration history
|
|
2109
|
+
|
|
2110
|
+
After customer sign-in, `client.events.listMyRegistrations({ page: 1, limit: 10 })`
|
|
2111
|
+
returns only that session's registrations with status, quantity, created time,
|
|
2112
|
+
and event/occurrence references plus current public title/time metadata.
|
|
2113
|
+
`page` defaults to 1; `limit` defaults to 10 and is capped at 100. The result has
|
|
2114
|
+
`docs`, `totalDocs`, `limit`, `page`, `totalPages`, `hasNextPage`, `hasPrevPage`.
|
|
2115
|
+
A customer JWT and matching publishable key are required; server keys cannot
|
|
2116
|
+
impersonate customers. Reads and responses use `no-store`. Non-public/missing
|
|
2117
|
+
metadata becomes null while registration references/status remain. PII expiry
|
|
2118
|
+
and cleanup preserve the same attendee-free DTO. Guest credentials, answers,
|
|
2119
|
+
audit fields and locations are absent; same-email guest records are not linked.
|
|
2120
|
+
|
|
2121
|
+
`createServerClient().events` excludes this customer-only method, following the
|
|
2122
|
+
customer-only membership/profile/order helpers. A server BFF creates a client
|
|
2123
|
+
per request with `createClient({ publishableKey, customer: { persist: false, token } })`
|
|
2124
|
+
and calls `client.events.listMyRegistrations()` with the customer's JWT.
|
|
2125
|
+
|
|
2049
2126
|
### Community public reads
|
|
2050
2127
|
|
|
2051
2128
|
Use the shaped `community` helpers for browser/customer community screens. A
|
package/dist/client.cjs
CHANGED
|
@@ -1418,7 +1418,9 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
|
|
|
1418
1418
|
),
|
|
1419
1419
|
stockCheck: operation("products", "post", "/stock-check"),
|
|
1420
1420
|
stockSnapshot: operation("products", "get", "/stock"),
|
|
1421
|
-
upsert: operation("products", "post", "/upsert")
|
|
1421
|
+
upsert: operation("products", "post", "/upsert"),
|
|
1422
|
+
graphRevision: operation("products", "get", "/:id/graph-revision"),
|
|
1423
|
+
variantsPatch: operation("products", "patch", "/:id/variants")
|
|
1422
1424
|
},
|
|
1423
1425
|
orders: {
|
|
1424
1426
|
create: operation("orders", "post", "/create"),
|
|
@@ -1587,6 +1589,14 @@ var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
|
|
|
1587
1589
|
revoke: operation("customer-groups", "post", "/:id/members/revoke")
|
|
1588
1590
|
};
|
|
1589
1591
|
var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
|
|
1592
|
+
register: operation("customers", "post", "/register"),
|
|
1593
|
+
login: operation("customers", "post", "/login"),
|
|
1594
|
+
refresh: operation("customers", "post", "/refresh"),
|
|
1595
|
+
me: operation("customers", "get", "/me"),
|
|
1596
|
+
updateProfile: operation("customers", "patch", "/me"),
|
|
1597
|
+
forgotPassword: operation("customers", "post", "/forgot-password"),
|
|
1598
|
+
resetPassword: operation("customers", "post", "/reset-password"),
|
|
1599
|
+
changePassword: operation("customers", "post", "/change-password"),
|
|
1590
1600
|
revokeRefresh: operation("customers", "post", "/revoke-refresh"),
|
|
1591
1601
|
withdraw: operation("customers", "post", "/withdraw")
|
|
1592
1602
|
};
|
|
@@ -1596,6 +1606,9 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
|
|
|
1596
1606
|
disable: operation("tenants", "delete", "/embedded-admin-app")
|
|
1597
1607
|
};
|
|
1598
1608
|
var EVENTS_ENDPOINT_OPERATIONS = {
|
|
1609
|
+
registrations: {
|
|
1610
|
+
listMine: operation("event-registrations", "get", "/my")
|
|
1611
|
+
},
|
|
1599
1612
|
events: {
|
|
1600
1613
|
convertSchedule: operation("events", "post", "/:id/schedule")
|
|
1601
1614
|
},
|
|
@@ -4021,19 +4034,24 @@ var CustomerAuth = class {
|
|
|
4021
4034
|
* Register a new customer account
|
|
4022
4035
|
*/
|
|
4023
4036
|
async register(data) {
|
|
4024
|
-
return this.requestJson(
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4037
|
+
return this.requestJson(
|
|
4038
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.register),
|
|
4039
|
+
{
|
|
4040
|
+
method: resolveOperationMethod(
|
|
4041
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.register
|
|
4042
|
+
),
|
|
4043
|
+
body: JSON.stringify(data)
|
|
4044
|
+
}
|
|
4045
|
+
);
|
|
4028
4046
|
}
|
|
4029
4047
|
/**
|
|
4030
4048
|
* Login with email and password. Stores the token internally.
|
|
4031
4049
|
*/
|
|
4032
4050
|
async login(data) {
|
|
4033
4051
|
const result = await this.requestJson(
|
|
4034
|
-
|
|
4052
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.login),
|
|
4035
4053
|
{
|
|
4036
|
-
method:
|
|
4054
|
+
method: resolveOperationMethod(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.login),
|
|
4037
4055
|
body: JSON.stringify(data)
|
|
4038
4056
|
}
|
|
4039
4057
|
);
|
|
@@ -4279,14 +4297,18 @@ var CustomerAuth = class {
|
|
|
4279
4297
|
}
|
|
4280
4298
|
async _doRefreshToken(intended) {
|
|
4281
4299
|
const init = intended.refreshToken ? {
|
|
4282
|
-
method:
|
|
4300
|
+
method: resolveOperationMethod(
|
|
4301
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.refresh
|
|
4302
|
+
),
|
|
4283
4303
|
body: JSON.stringify({ refreshToken: intended.refreshToken })
|
|
4284
4304
|
} : {
|
|
4285
|
-
method:
|
|
4305
|
+
method: resolveOperationMethod(
|
|
4306
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.refresh
|
|
4307
|
+
),
|
|
4286
4308
|
headers: { Authorization: `Bearer ${intended.token}` }
|
|
4287
4309
|
};
|
|
4288
4310
|
const result = await this.requestJson(
|
|
4289
|
-
|
|
4311
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.refresh),
|
|
4290
4312
|
init
|
|
4291
4313
|
);
|
|
4292
4314
|
const state = this.classifyCanonicalState(intended);
|
|
@@ -4355,9 +4377,9 @@ var CustomerAuth = class {
|
|
|
4355
4377
|
if (!token) return null;
|
|
4356
4378
|
try {
|
|
4357
4379
|
const data = await this.requestJson(
|
|
4358
|
-
|
|
4380
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.me),
|
|
4359
4381
|
{
|
|
4360
|
-
method:
|
|
4382
|
+
method: resolveOperationMethod(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.me),
|
|
4361
4383
|
headers: { Authorization: `Bearer ${token}` }
|
|
4362
4384
|
}
|
|
4363
4385
|
);
|
|
@@ -4374,19 +4396,29 @@ var CustomerAuth = class {
|
|
|
4374
4396
|
* Request a password reset email
|
|
4375
4397
|
*/
|
|
4376
4398
|
async forgotPassword(email) {
|
|
4377
|
-
await this.requestJson(
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4399
|
+
await this.requestJson(
|
|
4400
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.forgotPassword),
|
|
4401
|
+
{
|
|
4402
|
+
method: resolveOperationMethod(
|
|
4403
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.forgotPassword
|
|
4404
|
+
),
|
|
4405
|
+
body: JSON.stringify({ email })
|
|
4406
|
+
}
|
|
4407
|
+
);
|
|
4381
4408
|
}
|
|
4382
4409
|
/**
|
|
4383
4410
|
* Reset password using a token from the reset email
|
|
4384
4411
|
*/
|
|
4385
4412
|
async resetPassword(token, password) {
|
|
4386
|
-
await this.requestJson(
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4413
|
+
await this.requestJson(
|
|
4414
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.resetPassword),
|
|
4415
|
+
{
|
|
4416
|
+
method: resolveOperationMethod(
|
|
4417
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.resetPassword
|
|
4418
|
+
),
|
|
4419
|
+
body: JSON.stringify({ token, password })
|
|
4420
|
+
}
|
|
4421
|
+
);
|
|
4390
4422
|
}
|
|
4391
4423
|
/**
|
|
4392
4424
|
* Update the authenticated customer's profile (name, phone, marketingConsent)
|
|
@@ -4395,9 +4427,11 @@ var CustomerAuth = class {
|
|
|
4395
4427
|
const token = this.getToken();
|
|
4396
4428
|
if (!token) throw new ApiError("Not authenticated", 401);
|
|
4397
4429
|
const result = await this.requestJson(
|
|
4398
|
-
|
|
4430
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.updateProfile),
|
|
4399
4431
|
{
|
|
4400
|
-
method:
|
|
4432
|
+
method: resolveOperationMethod(
|
|
4433
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.updateProfile
|
|
4434
|
+
),
|
|
4401
4435
|
headers: { Authorization: `Bearer ${token}` },
|
|
4402
4436
|
body: JSON.stringify(data)
|
|
4403
4437
|
}
|
|
@@ -4410,11 +4444,16 @@ var CustomerAuth = class {
|
|
|
4410
4444
|
async changePassword(currentPassword, newPassword) {
|
|
4411
4445
|
const token = this.getToken();
|
|
4412
4446
|
if (!token) throw new ApiError("Not authenticated", 401);
|
|
4413
|
-
await this.requestJson(
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4447
|
+
await this.requestJson(
|
|
4448
|
+
resolveOperationPath(CUSTOMER_AUTH_ENDPOINT_OPERATIONS.changePassword),
|
|
4449
|
+
{
|
|
4450
|
+
method: resolveOperationMethod(
|
|
4451
|
+
CUSTOMER_AUTH_ENDPOINT_OPERATIONS.changePassword
|
|
4452
|
+
),
|
|
4453
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
4454
|
+
body: JSON.stringify({ currentPassword, newPassword })
|
|
4455
|
+
}
|
|
4456
|
+
);
|
|
4418
4457
|
}
|
|
4419
4458
|
/**
|
|
4420
4459
|
* Get the authenticated customer's orders with pagination and optional status filter
|
|
@@ -6212,6 +6251,18 @@ var EventsClient = class {
|
|
|
6212
6251
|
{ useCustomerAuth: false }
|
|
6213
6252
|
);
|
|
6214
6253
|
}
|
|
6254
|
+
listMyRegistrations(params = {}) {
|
|
6255
|
+
const query = new URLSearchParams();
|
|
6256
|
+
if (params.page !== void 0) query.set("page", String(params.page));
|
|
6257
|
+
if (params.limit !== void 0) query.set("limit", String(params.limit));
|
|
6258
|
+
const operation2 = EVENTS_ENDPOINT_OPERATIONS.registrations.listMine;
|
|
6259
|
+
return this.execute(
|
|
6260
|
+
resolveOperationPath(operation2, { query }),
|
|
6261
|
+
resolveOperationMethod(operation2),
|
|
6262
|
+
void 0,
|
|
6263
|
+
{ useCustomerAuth: true, noStore: true }
|
|
6264
|
+
);
|
|
6265
|
+
}
|
|
6215
6266
|
register(params) {
|
|
6216
6267
|
return this.execute(
|
|
6217
6268
|
"/api/event-registrations/register",
|
|
@@ -6242,6 +6293,7 @@ var EventsClient = class {
|
|
|
6242
6293
|
try {
|
|
6243
6294
|
const response = await httpFetch(endpoint, {
|
|
6244
6295
|
method,
|
|
6296
|
+
...options.noStore && { cache: "no-store" },
|
|
6245
6297
|
apiUrl: this.apiUrl,
|
|
6246
6298
|
publishableKey: this.publishableKey,
|
|
6247
6299
|
...useCustomerAuth && token ? { customerToken: token } : {},
|