@spoketech/hub-client 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +19 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1490,6 +1490,7 @@ declare const GuestSchema: Schema.Struct<{
|
|
|
1490
1490
|
readonly mobilePhone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1491
1491
|
readonly firstName: Schema.String;
|
|
1492
1492
|
readonly lastName: Schema.String;
|
|
1493
|
+
readonly dob: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1493
1494
|
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
1494
1495
|
readonly marketingPreferences: Schema.Struct<{
|
|
1495
1496
|
readonly email: Schema.Boolean;
|
|
@@ -1512,6 +1513,7 @@ declare const PaginatedGuestsSchema: Schema.Struct<{
|
|
|
1512
1513
|
readonly mobilePhone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1513
1514
|
readonly firstName: Schema.String;
|
|
1514
1515
|
readonly lastName: Schema.String;
|
|
1516
|
+
readonly dob: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1515
1517
|
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
1516
1518
|
readonly marketingPreferences: Schema.Struct<{
|
|
1517
1519
|
readonly email: Schema.Boolean;
|
|
@@ -2340,6 +2342,7 @@ declare const CreateGuestSchema: Schema.Struct<{
|
|
|
2340
2342
|
readonly mobilePhone: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2341
2343
|
readonly firstName: Schema.String;
|
|
2342
2344
|
readonly lastName: Schema.String;
|
|
2345
|
+
readonly dob: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2343
2346
|
readonly meta: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
2344
2347
|
readonly marketingPreferences: Schema.optional<Schema.Struct<{
|
|
2345
2348
|
readonly email: Schema.optional<Schema.Boolean>;
|
|
@@ -2356,6 +2359,7 @@ declare const UpdateGuestSchema: Schema.Struct<{
|
|
|
2356
2359
|
readonly mobilePhone: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2357
2360
|
readonly firstName: Schema.optional<Schema.String>;
|
|
2358
2361
|
readonly lastName: Schema.optional<Schema.String>;
|
|
2362
|
+
readonly dob: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2359
2363
|
readonly meta: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
2360
2364
|
readonly marketingPreferences: Schema.optional<Schema.Struct<{
|
|
2361
2365
|
readonly email: Schema.optional<Schema.Boolean>;
|
|
@@ -2996,6 +3000,7 @@ declare const RequestSourceManagedMemberPreferenceUpdateSchema: Schema.Struct<{
|
|
|
2996
3000
|
}>;
|
|
2997
3001
|
}>;
|
|
2998
3002
|
declare const RequestSourceManagedMemberRenewalSchema: Schema.Struct<{
|
|
3003
|
+
readonly expiresAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2999
3004
|
readonly expectedUpdatedAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3000
3005
|
}>;
|
|
3001
3006
|
declare const SourceManagedMemberLookupBySchema: Schema.Literals<readonly ["member_id", "badge_number", "card_number"]>;
|
|
@@ -3188,6 +3193,7 @@ declare const OnsiteResourceCallRequestSchema: Schema.Union<readonly [Schema.Str
|
|
|
3188
3193
|
readonly waitMs: Schema.optional<Schema.Number>;
|
|
3189
3194
|
readonly memberId: Schema.String;
|
|
3190
3195
|
readonly payload: Schema.Struct<{
|
|
3196
|
+
readonly expiresAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3191
3197
|
readonly expectedUpdatedAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3192
3198
|
}>;
|
|
3193
3199
|
}>, Schema.Struct<{
|
|
@@ -6947,6 +6953,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
6947
6953
|
readonly organizationId: Schema.String;
|
|
6948
6954
|
readonly memberId: Schema.String;
|
|
6949
6955
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
6956
|
+
readonly expiresAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6950
6957
|
readonly expectedUpdatedAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
6951
6958
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
6952
6959
|
readonly id: Schema.String;
|
|
@@ -8764,6 +8771,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
8764
8771
|
readonly waitMs: Schema.optional<Schema.Number>;
|
|
8765
8772
|
readonly memberId: Schema.String;
|
|
8766
8773
|
readonly payload: Schema.Struct<{
|
|
8774
|
+
readonly expiresAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
8767
8775
|
readonly expectedUpdatedAt: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
8768
8776
|
}>;
|
|
8769
8777
|
}>, Schema.Struct<{
|
|
@@ -12428,6 +12436,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
12428
12436
|
readonly mobilePhone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12429
12437
|
readonly firstName: Schema.String;
|
|
12430
12438
|
readonly lastName: Schema.String;
|
|
12439
|
+
readonly dob: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12431
12440
|
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
12432
12441
|
readonly marketingPreferences: Schema.Struct<{
|
|
12433
12442
|
readonly email: Schema.Boolean;
|
|
@@ -12477,6 +12486,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
12477
12486
|
readonly mobilePhone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12478
12487
|
readonly firstName: Schema.String;
|
|
12479
12488
|
readonly lastName: Schema.String;
|
|
12489
|
+
readonly dob: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12480
12490
|
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
12481
12491
|
readonly marketingPreferences: Schema.Struct<{
|
|
12482
12492
|
readonly email: Schema.Boolean;
|
|
@@ -12515,6 +12525,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
12515
12525
|
readonly mobilePhone: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
12516
12526
|
readonly firstName: Schema.String;
|
|
12517
12527
|
readonly lastName: Schema.String;
|
|
12528
|
+
readonly dob: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
12518
12529
|
readonly meta: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
12519
12530
|
readonly marketingPreferences: Schema.optional<Schema.Struct<{
|
|
12520
12531
|
readonly email: Schema.optional<Schema.Boolean>;
|
|
@@ -12531,6 +12542,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
12531
12542
|
readonly mobilePhone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12532
12543
|
readonly firstName: Schema.String;
|
|
12533
12544
|
readonly lastName: Schema.String;
|
|
12545
|
+
readonly dob: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12534
12546
|
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
12535
12547
|
readonly marketingPreferences: Schema.Struct<{
|
|
12536
12548
|
readonly email: Schema.Boolean;
|
|
@@ -12571,6 +12583,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
12571
12583
|
readonly mobilePhone: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
12572
12584
|
readonly firstName: Schema.optional<Schema.String>;
|
|
12573
12585
|
readonly lastName: Schema.optional<Schema.String>;
|
|
12586
|
+
readonly dob: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
12574
12587
|
readonly meta: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
12575
12588
|
readonly marketingPreferences: Schema.optional<Schema.Struct<{
|
|
12576
12589
|
readonly email: Schema.optional<Schema.Boolean>;
|
|
@@ -12587,6 +12600,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
12587
12600
|
readonly mobilePhone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12588
12601
|
readonly firstName: Schema.String;
|
|
12589
12602
|
readonly lastName: Schema.String;
|
|
12603
|
+
readonly dob: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12590
12604
|
readonly meta: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
12591
12605
|
readonly marketingPreferences: Schema.Struct<{
|
|
12592
12606
|
readonly email: Schema.Boolean;
|
|
@@ -15784,6 +15798,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
15784
15798
|
readonly mobilePhone: string | null;
|
|
15785
15799
|
readonly firstName: string;
|
|
15786
15800
|
readonly lastName: string;
|
|
15801
|
+
readonly dob: string | null;
|
|
15787
15802
|
readonly meta: {
|
|
15788
15803
|
readonly [x: string]: unknown;
|
|
15789
15804
|
};
|
|
@@ -15818,6 +15833,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
15818
15833
|
readonly mobilePhone: string | null;
|
|
15819
15834
|
readonly firstName: string;
|
|
15820
15835
|
readonly lastName: string;
|
|
15836
|
+
readonly dob: string | null;
|
|
15821
15837
|
readonly meta: {
|
|
15822
15838
|
readonly [x: string]: unknown;
|
|
15823
15839
|
};
|
|
@@ -15844,6 +15860,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
15844
15860
|
readonly mobilePhone: string | null;
|
|
15845
15861
|
readonly firstName: string;
|
|
15846
15862
|
readonly lastName: string;
|
|
15863
|
+
readonly dob: string | null;
|
|
15847
15864
|
readonly meta: {
|
|
15848
15865
|
readonly [x: string]: unknown;
|
|
15849
15866
|
};
|
|
@@ -15871,6 +15888,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
15871
15888
|
readonly mobilePhone: string | null;
|
|
15872
15889
|
readonly firstName: string;
|
|
15873
15890
|
readonly lastName: string;
|
|
15891
|
+
readonly dob: string | null;
|
|
15874
15892
|
readonly meta: {
|
|
15875
15893
|
readonly [x: string]: unknown;
|
|
15876
15894
|
};
|
|
@@ -16062,6 +16080,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
16062
16080
|
readonly waitMs?: number | undefined;
|
|
16063
16081
|
} | {
|
|
16064
16082
|
readonly payload: {
|
|
16083
|
+
readonly expiresAt?: string | null | undefined;
|
|
16065
16084
|
readonly expectedUpdatedAt?: string | null | undefined;
|
|
16066
16085
|
};
|
|
16067
16086
|
readonly memberId: string;
|
package/dist/index.js
CHANGED
|
@@ -2624,6 +2624,7 @@ var GuestSchema = Schema2.Struct({
|
|
|
2624
2624
|
mobilePhone: NullableMobilePhoneSchema,
|
|
2625
2625
|
firstName: Schema2.String,
|
|
2626
2626
|
lastName: Schema2.String,
|
|
2627
|
+
dob: Schema2.Union([DateOnlySchema, Schema2.Null]),
|
|
2627
2628
|
meta: JsonObjectSchema,
|
|
2628
2629
|
marketingPreferences: MarketingPreferencesSchema,
|
|
2629
2630
|
status: Schema2.Literals([...guestStatuses]),
|
|
@@ -3273,11 +3274,21 @@ var UpdateMemberSchema = Schema2.Struct({
|
|
|
3273
3274
|
cardId: OptionalNullableString,
|
|
3274
3275
|
customFields: Schema2.optional(JsonObjectSchema)
|
|
3275
3276
|
});
|
|
3277
|
+
var GuestDobSchema = DateOnlySchema.check(
|
|
3278
|
+
Schema2.makeFilter(
|
|
3279
|
+
(value) => {
|
|
3280
|
+
const date = /* @__PURE__ */ new Date(`${value}T00:00:00.000Z`);
|
|
3281
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(value) && !Number.isNaN(date.getTime()) && date.toISOString().slice(0, 10) === value;
|
|
3282
|
+
},
|
|
3283
|
+
{ message: "Date of birth must be a valid date in YYYY-MM-DD format" }
|
|
3284
|
+
)
|
|
3285
|
+
);
|
|
3276
3286
|
var CreateGuestSchema = Schema2.Struct({
|
|
3277
3287
|
email: OptionalNullableString,
|
|
3278
3288
|
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
3279
3289
|
firstName: Schema2.String,
|
|
3280
3290
|
lastName: Schema2.String,
|
|
3291
|
+
dob: Schema2.optional(Schema2.Union([GuestDobSchema, Schema2.Null])),
|
|
3281
3292
|
meta: Schema2.optional(JsonObjectSchema),
|
|
3282
3293
|
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema)
|
|
3283
3294
|
}).annotate({
|
|
@@ -3289,6 +3300,7 @@ var UpdateGuestSchema = Schema2.Struct({
|
|
|
3289
3300
|
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
3290
3301
|
firstName: Schema2.optional(Schema2.String),
|
|
3291
3302
|
lastName: Schema2.optional(Schema2.String),
|
|
3303
|
+
dob: Schema2.optional(Schema2.Union([GuestDobSchema, Schema2.Null])),
|
|
3292
3304
|
meta: Schema2.optional(JsonObjectSchema),
|
|
3293
3305
|
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema)
|
|
3294
3306
|
}).annotate({
|
|
@@ -3606,6 +3618,7 @@ var RequestSourceManagedMemberPreferenceUpdateSchema = Schema2.Struct({
|
|
|
3606
3618
|
marketingPreferences: MarketingPreferencesInputSchema
|
|
3607
3619
|
});
|
|
3608
3620
|
var RequestSourceManagedMemberRenewalSchema = Schema2.Struct({
|
|
3621
|
+
expiresAt: Schema2.optional(Schema2.Union([TimestampSchema, Schema2.Null])),
|
|
3609
3622
|
expectedUpdatedAt: Schema2.optional(
|
|
3610
3623
|
Schema2.Union([TimestampSchema, Schema2.Null])
|
|
3611
3624
|
)
|