@spoketech/hub-client 0.1.12 → 0.1.13
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 +26 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -166,6 +166,7 @@ declare const RequestVoucherLookupSchema: Schema.Struct<{
|
|
|
166
166
|
memberId: Schema.optional<typeof Schema.String>;
|
|
167
167
|
externalSystemMemberId: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Null]>>;
|
|
168
168
|
memberNumber: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Null]>>;
|
|
169
|
+
cacheTtlMs: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
169
170
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
170
171
|
}>;
|
|
171
172
|
declare const OnsiteVoucherCommandSchema: Schema.Struct<{
|
|
@@ -265,6 +266,7 @@ declare const RequestPointLookupSchema: Schema.Struct<{
|
|
|
265
266
|
cardData: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Null]>>;
|
|
266
267
|
account: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
|
|
267
268
|
packetNumber: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
|
|
269
|
+
cacheTtlMs: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
268
270
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
269
271
|
}>;
|
|
270
272
|
declare const RequestPointDebitSchema: Schema.Struct<{
|
|
@@ -2304,6 +2306,7 @@ declare const OnsiteResourceCallRequestSchema: Schema.Union<[Schema.Struct<{
|
|
|
2304
2306
|
memberId: Schema.optional<typeof Schema.String>;
|
|
2305
2307
|
externalSystemMemberId: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Null]>>;
|
|
2306
2308
|
memberNumber: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Null]>>;
|
|
2309
|
+
cacheTtlMs: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
2307
2310
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
2308
2311
|
}>;
|
|
2309
2312
|
}>, Schema.Struct<{
|
|
@@ -2316,6 +2319,7 @@ declare const OnsiteResourceCallRequestSchema: Schema.Union<[Schema.Struct<{
|
|
|
2316
2319
|
cardData: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Null]>>;
|
|
2317
2320
|
account: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
|
|
2318
2321
|
packetNumber: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
|
|
2322
|
+
cacheTtlMs: Schema.optional<Schema.SchemaClass<number, number, never>>;
|
|
2319
2323
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
2320
2324
|
}>;
|
|
2321
2325
|
}>, Schema.Struct<{
|
|
@@ -4734,6 +4738,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
4734
4738
|
readonly metadata?: {
|
|
4735
4739
|
readonly [x: string]: unknown;
|
|
4736
4740
|
} | undefined;
|
|
4741
|
+
readonly cacheTtlMs?: number | undefined;
|
|
4737
4742
|
}, never, {
|
|
4738
4743
|
readonly status: "requested" | "accepted" | "completed" | "failed";
|
|
4739
4744
|
readonly id: string;
|
|
@@ -4930,6 +4935,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
4930
4935
|
readonly metadata?: {
|
|
4931
4936
|
readonly [x: string]: unknown;
|
|
4932
4937
|
} | undefined;
|
|
4938
|
+
readonly cacheTtlMs?: number | undefined;
|
|
4933
4939
|
readonly cardData?: string | null | undefined;
|
|
4934
4940
|
readonly account?: string | number | undefined;
|
|
4935
4941
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -5340,6 +5346,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
5340
5346
|
readonly metadata?: {
|
|
5341
5347
|
readonly [x: string]: unknown;
|
|
5342
5348
|
} | undefined;
|
|
5349
|
+
readonly cacheTtlMs?: number | undefined;
|
|
5343
5350
|
};
|
|
5344
5351
|
readonly operation: "voucher.lookup";
|
|
5345
5352
|
readonly waitMs?: number | undefined;
|
|
@@ -5351,6 +5358,7 @@ declare const HubApi: HttpApi.HttpApi<"hub", HttpApiGroup.HttpApiGroup<"auth", H
|
|
|
5351
5358
|
readonly metadata?: {
|
|
5352
5359
|
readonly [x: string]: unknown;
|
|
5353
5360
|
} | undefined;
|
|
5361
|
+
readonly cacheTtlMs?: number | undefined;
|
|
5354
5362
|
readonly cardData?: string | null | undefined;
|
|
5355
5363
|
readonly account?: string | number | undefined;
|
|
5356
5364
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -10591,6 +10599,7 @@ declare const makeHubApiClient: (options: HubApiClientOptions) => Effect.Effect<
|
|
|
10591
10599
|
readonly metadata?: {
|
|
10592
10600
|
readonly [x: string]: unknown;
|
|
10593
10601
|
} | undefined;
|
|
10602
|
+
readonly cacheTtlMs?: number | undefined;
|
|
10594
10603
|
};
|
|
10595
10604
|
readonly withResponse?: WithResponse | undefined;
|
|
10596
10605
|
}) => Effect.Effect<WithResponse extends true ? [{
|
|
@@ -11078,6 +11087,7 @@ declare const makeHubApiClient: (options: HubApiClientOptions) => Effect.Effect<
|
|
|
11078
11087
|
readonly metadata?: {
|
|
11079
11088
|
readonly [x: string]: unknown;
|
|
11080
11089
|
} | undefined;
|
|
11090
|
+
readonly cacheTtlMs?: number | undefined;
|
|
11081
11091
|
readonly cardData?: string | null | undefined;
|
|
11082
11092
|
readonly account?: string | number | undefined;
|
|
11083
11093
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -11886,6 +11896,7 @@ declare const makeHubApiClient: (options: HubApiClientOptions) => Effect.Effect<
|
|
|
11886
11896
|
readonly metadata?: {
|
|
11887
11897
|
readonly [x: string]: unknown;
|
|
11888
11898
|
} | undefined;
|
|
11899
|
+
readonly cacheTtlMs?: number | undefined;
|
|
11889
11900
|
};
|
|
11890
11901
|
readonly operation: "voucher.lookup";
|
|
11891
11902
|
readonly waitMs?: number | undefined;
|
|
@@ -11903,6 +11914,7 @@ declare const makeHubApiClient: (options: HubApiClientOptions) => Effect.Effect<
|
|
|
11903
11914
|
readonly metadata?: {
|
|
11904
11915
|
readonly [x: string]: unknown;
|
|
11905
11916
|
} | undefined;
|
|
11917
|
+
readonly cacheTtlMs?: number | undefined;
|
|
11906
11918
|
readonly cardData?: string | null | undefined;
|
|
11907
11919
|
readonly account?: string | number | undefined;
|
|
11908
11920
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -18939,6 +18951,7 @@ declare const makeServiceHubApiClient: (options: HubApiCredentialOptions) => Eff
|
|
|
18939
18951
|
readonly metadata?: {
|
|
18940
18952
|
readonly [x: string]: unknown;
|
|
18941
18953
|
} | undefined;
|
|
18954
|
+
readonly cacheTtlMs?: number | undefined;
|
|
18942
18955
|
};
|
|
18943
18956
|
readonly withResponse?: WithResponse | undefined;
|
|
18944
18957
|
}) => Effect.Effect<WithResponse extends true ? [{
|
|
@@ -19426,6 +19439,7 @@ declare const makeServiceHubApiClient: (options: HubApiCredentialOptions) => Eff
|
|
|
19426
19439
|
readonly metadata?: {
|
|
19427
19440
|
readonly [x: string]: unknown;
|
|
19428
19441
|
} | undefined;
|
|
19442
|
+
readonly cacheTtlMs?: number | undefined;
|
|
19429
19443
|
readonly cardData?: string | null | undefined;
|
|
19430
19444
|
readonly account?: string | number | undefined;
|
|
19431
19445
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -20234,6 +20248,7 @@ declare const makeServiceHubApiClient: (options: HubApiCredentialOptions) => Eff
|
|
|
20234
20248
|
readonly metadata?: {
|
|
20235
20249
|
readonly [x: string]: unknown;
|
|
20236
20250
|
} | undefined;
|
|
20251
|
+
readonly cacheTtlMs?: number | undefined;
|
|
20237
20252
|
};
|
|
20238
20253
|
readonly operation: "voucher.lookup";
|
|
20239
20254
|
readonly waitMs?: number | undefined;
|
|
@@ -20251,6 +20266,7 @@ declare const makeServiceHubApiClient: (options: HubApiCredentialOptions) => Eff
|
|
|
20251
20266
|
readonly metadata?: {
|
|
20252
20267
|
readonly [x: string]: unknown;
|
|
20253
20268
|
} | undefined;
|
|
20269
|
+
readonly cacheTtlMs?: number | undefined;
|
|
20254
20270
|
readonly cardData?: string | null | undefined;
|
|
20255
20271
|
readonly account?: string | number | undefined;
|
|
20256
20272
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -27289,6 +27305,7 @@ declare const makePromiseServiceHubApiClient: (options: HubApiCredentialOptions)
|
|
|
27289
27305
|
readonly metadata?: {
|
|
27290
27306
|
readonly [x: string]: unknown;
|
|
27291
27307
|
} | undefined;
|
|
27308
|
+
readonly cacheTtlMs?: number | undefined;
|
|
27292
27309
|
};
|
|
27293
27310
|
readonly withResponse?: WithResponse | undefined;
|
|
27294
27311
|
}) => Effect.Effect<WithResponse extends true ? [{
|
|
@@ -27776,6 +27793,7 @@ declare const makePromiseServiceHubApiClient: (options: HubApiCredentialOptions)
|
|
|
27776
27793
|
readonly metadata?: {
|
|
27777
27794
|
readonly [x: string]: unknown;
|
|
27778
27795
|
} | undefined;
|
|
27796
|
+
readonly cacheTtlMs?: number | undefined;
|
|
27779
27797
|
readonly cardData?: string | null | undefined;
|
|
27780
27798
|
readonly account?: string | number | undefined;
|
|
27781
27799
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -28584,6 +28602,7 @@ declare const makePromiseServiceHubApiClient: (options: HubApiCredentialOptions)
|
|
|
28584
28602
|
readonly metadata?: {
|
|
28585
28603
|
readonly [x: string]: unknown;
|
|
28586
28604
|
} | undefined;
|
|
28605
|
+
readonly cacheTtlMs?: number | undefined;
|
|
28587
28606
|
};
|
|
28588
28607
|
readonly operation: "voucher.lookup";
|
|
28589
28608
|
readonly waitMs?: number | undefined;
|
|
@@ -28601,6 +28620,7 @@ declare const makePromiseServiceHubApiClient: (options: HubApiCredentialOptions)
|
|
|
28601
28620
|
readonly metadata?: {
|
|
28602
28621
|
readonly [x: string]: unknown;
|
|
28603
28622
|
} | undefined;
|
|
28623
|
+
readonly cacheTtlMs?: number | undefined;
|
|
28604
28624
|
readonly cardData?: string | null | undefined;
|
|
28605
28625
|
readonly account?: string | number | undefined;
|
|
28606
28626
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -35806,6 +35826,7 @@ declare const makePromiseOnsiteResourceClient: (options: HubApiCredentialOptions
|
|
|
35806
35826
|
readonly metadata?: {
|
|
35807
35827
|
readonly [x: string]: unknown;
|
|
35808
35828
|
} | undefined;
|
|
35829
|
+
readonly cacheTtlMs?: number | undefined;
|
|
35809
35830
|
};
|
|
35810
35831
|
readonly withResponse?: WithResponse | undefined;
|
|
35811
35832
|
}) => Effect.Effect<WithResponse extends true ? [{
|
|
@@ -36293,6 +36314,7 @@ declare const makePromiseOnsiteResourceClient: (options: HubApiCredentialOptions
|
|
|
36293
36314
|
readonly metadata?: {
|
|
36294
36315
|
readonly [x: string]: unknown;
|
|
36295
36316
|
} | undefined;
|
|
36317
|
+
readonly cacheTtlMs?: number | undefined;
|
|
36296
36318
|
readonly cardData?: string | null | undefined;
|
|
36297
36319
|
readonly account?: string | number | undefined;
|
|
36298
36320
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -37101,6 +37123,7 @@ declare const makePromiseOnsiteResourceClient: (options: HubApiCredentialOptions
|
|
|
37101
37123
|
readonly metadata?: {
|
|
37102
37124
|
readonly [x: string]: unknown;
|
|
37103
37125
|
} | undefined;
|
|
37126
|
+
readonly cacheTtlMs?: number | undefined;
|
|
37104
37127
|
};
|
|
37105
37128
|
readonly operation: "voucher.lookup";
|
|
37106
37129
|
readonly waitMs?: number | undefined;
|
|
@@ -37118,6 +37141,7 @@ declare const makePromiseOnsiteResourceClient: (options: HubApiCredentialOptions
|
|
|
37118
37141
|
readonly metadata?: {
|
|
37119
37142
|
readonly [x: string]: unknown;
|
|
37120
37143
|
} | undefined;
|
|
37144
|
+
readonly cacheTtlMs?: number | undefined;
|
|
37121
37145
|
readonly cardData?: string | null | undefined;
|
|
37122
37146
|
readonly account?: string | number | undefined;
|
|
37123
37147
|
readonly packetNumber?: string | number | undefined;
|
|
@@ -42896,6 +42920,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
42896
42920
|
readonly metadata?: {
|
|
42897
42921
|
readonly [x: string]: unknown;
|
|
42898
42922
|
} | undefined;
|
|
42923
|
+
readonly cacheTtlMs?: number | undefined;
|
|
42899
42924
|
};
|
|
42900
42925
|
readonly operation: "voucher.lookup";
|
|
42901
42926
|
readonly waitMs?: number | undefined;
|
|
@@ -42907,6 +42932,7 @@ declare function makeSpokeClient(hubClient: PromiseHubApiClient): {
|
|
|
42907
42932
|
readonly metadata?: {
|
|
42908
42933
|
readonly [x: string]: unknown;
|
|
42909
42934
|
} | undefined;
|
|
42935
|
+
readonly cacheTtlMs?: number | undefined;
|
|
42910
42936
|
readonly cardData?: string | null | undefined;
|
|
42911
42937
|
readonly account?: string | number | undefined;
|
|
42912
42938
|
readonly packetNumber?: string | number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -144,6 +144,12 @@ var NullableString = Schema2.Union(Schema2.String, Schema2.Null);
|
|
|
144
144
|
var OptionalNullableString = Schema2.optional(NullableString);
|
|
145
145
|
var NullableNumber = Schema2.Union(Schema2.Number, Schema2.Null);
|
|
146
146
|
var OptionalNullableNumber = Schema2.optional(NullableNumber);
|
|
147
|
+
var LookupCacheTtlMsSchema = Schema2.optional(
|
|
148
|
+
Schema2.Number.annotations({
|
|
149
|
+
description: "Maximum age in milliseconds for reusing a completed matching lookup command instead of calling the onsite client. Omit or set to 0 to always request a fresh onsite lookup.",
|
|
150
|
+
example: 3e4
|
|
151
|
+
})
|
|
152
|
+
);
|
|
147
153
|
var JsonObjectSchema = Schema2.Record({
|
|
148
154
|
key: Schema2.String,
|
|
149
155
|
value: Schema2.Unknown
|
|
@@ -332,6 +338,7 @@ var RequestVoucherLookupSchema = Schema2.Struct({
|
|
|
332
338
|
memberId: Schema2.optional(Schema2.String),
|
|
333
339
|
externalSystemMemberId: OptionalNullableString,
|
|
334
340
|
memberNumber: OptionalNullableString,
|
|
341
|
+
cacheTtlMs: LookupCacheTtlMsSchema,
|
|
335
342
|
metadata: Schema2.optional(JsonObjectSchema)
|
|
336
343
|
});
|
|
337
344
|
var OnsiteVoucherCommandSchema = Schema2.Struct({
|
|
@@ -412,6 +419,7 @@ var RequestPointLookupSchema = Schema2.Struct({
|
|
|
412
419
|
cardData: OptionalNullableString,
|
|
413
420
|
account: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Number)),
|
|
414
421
|
packetNumber: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Number)),
|
|
422
|
+
cacheTtlMs: LookupCacheTtlMsSchema,
|
|
415
423
|
metadata: Schema2.optional(JsonObjectSchema)
|
|
416
424
|
});
|
|
417
425
|
var RequestPointDebitSchema = Schema2.Struct({
|