@ophelio/sdk 0.3.2 → 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/dist/index.d.cts CHANGED
@@ -659,6 +659,38 @@ interface paths {
659
659
  patch?: never;
660
660
  trace?: never;
661
661
  };
662
+ "/api/v1/target-codes": {
663
+ parameters: {
664
+ query?: never;
665
+ header?: never;
666
+ path?: never;
667
+ cookie?: never;
668
+ };
669
+ get: operations["TargetCodesController_list"];
670
+ put?: never;
671
+ post: operations["TargetCodesController_create"];
672
+ delete?: never;
673
+ options?: never;
674
+ head?: never;
675
+ patch?: never;
676
+ trace?: never;
677
+ };
678
+ "/api/v1/target-codes/{id}": {
679
+ parameters: {
680
+ query?: never;
681
+ header?: never;
682
+ path?: never;
683
+ cookie?: never;
684
+ };
685
+ get: operations["TargetCodesController_get"];
686
+ put?: never;
687
+ post?: never;
688
+ delete: operations["TargetCodesController_delete"];
689
+ options?: never;
690
+ head?: never;
691
+ patch: operations["TargetCodesController_update"];
692
+ trace?: never;
693
+ };
662
694
  "/api/v1/member-roles": {
663
695
  parameters: {
664
696
  query?: never;
@@ -1075,38 +1107,6 @@ interface paths {
1075
1107
  patch?: never;
1076
1108
  trace?: never;
1077
1109
  };
1078
- "/api/v1/target-codes": {
1079
- parameters: {
1080
- query?: never;
1081
- header?: never;
1082
- path?: never;
1083
- cookie?: never;
1084
- };
1085
- get: operations["TargetCodesController_list"];
1086
- put?: never;
1087
- post: operations["TargetCodesController_create"];
1088
- delete?: never;
1089
- options?: never;
1090
- head?: never;
1091
- patch?: never;
1092
- trace?: never;
1093
- };
1094
- "/api/v1/target-codes/{id}": {
1095
- parameters: {
1096
- query?: never;
1097
- header?: never;
1098
- path?: never;
1099
- cookie?: never;
1100
- };
1101
- get: operations["TargetCodesController_get"];
1102
- put?: never;
1103
- post?: never;
1104
- delete: operations["TargetCodesController_delete"];
1105
- options?: never;
1106
- head?: never;
1107
- patch: operations["TargetCodesController_update"];
1108
- trace?: never;
1109
- };
1110
1110
  "/api/inngest": {
1111
1111
  parameters: {
1112
1112
  query?: never;
@@ -1173,6 +1173,7 @@ interface components {
1173
1173
  timezone?: string | null;
1174
1174
  default_currency?: string | null; /** @enum {string|null} */
1175
1175
  display_locale?: "de-DE" | "en-GB" | "en-US" | "es-ES" | "fr-FR" | "it-IT" | "nl-NL" | null;
1176
+ require_target_context?: boolean | null;
1176
1177
  };
1177
1178
  CreateOrganizationDto: {
1178
1179
  slug: string;
@@ -1509,6 +1510,7 @@ interface components {
1509
1510
  entitlement_code: string;
1510
1511
  members: string[];
1511
1512
  used_time?: string;
1513
+ target?: string;
1512
1514
  context: {
1513
1515
  [key: string]: unknown;
1514
1516
  };
@@ -1519,6 +1521,7 @@ interface components {
1519
1521
  member_id: string;
1520
1522
  plan_entitlement_id: string; /** Format: date-time */
1521
1523
  used_time: string;
1524
+ target: string | null;
1522
1525
  context: {
1523
1526
  [key: string]: unknown;
1524
1527
  } | null;
@@ -1539,6 +1542,49 @@ interface components {
1539
1542
  display_name: string;
1540
1543
  description: string;
1541
1544
  };
1545
+ EntitlementValidityWindow: {
1546
+ /**
1547
+ * @description First calendar day the rule covers, as `YYYY-MM-DD` in the project timezone. Null means the window is open-ended at the start.
1548
+ * @example 2026-01-01
1549
+ */
1550
+ date_from: string | null;
1551
+ /**
1552
+ * @description Last calendar day the rule covers, inclusive, as `YYYY-MM-DD` in the project timezone. Null means the window is open-ended at the end.
1553
+ * @example 2026-03-31
1554
+ */
1555
+ date_until: string | null;
1556
+ /**
1557
+ * @description Weekdays the rule covers, in ISO-8601 numbering: 1 = Monday … 7 = Sunday. An empty array means every day.
1558
+ * @example [
1559
+ * 1,
1560
+ * 2,
1561
+ * 3,
1562
+ * 4
1563
+ * ]
1564
+ */
1565
+ days_of_week: number[];
1566
+ };
1567
+ MemberEntitlement: {
1568
+ /** @description When the entitlement is valid, taken from the availability rules that matched. Only matched rules are listed. Omitted entirely when nothing restricts the entitlement by date. */valid_on?: components["schemas"]["EntitlementValidityWindow"][];
1569
+ /**
1570
+ * @description Where the entitlement is valid, taken from the availability rows that matched. Only matched rows are listed. Omitted entirely when nothing restricts the entitlement by target.
1571
+ * @example [
1572
+ * "coffee_shop",
1573
+ * "venue_a"
1574
+ * ]
1575
+ */
1576
+ valid_at?: string[];
1577
+ code: string; /** @enum {string} */
1578
+ type: "discount" | "early_access" | "free_entry" | "guest_pass";
1579
+ display_name: string;
1580
+ plan_entitlement_id: string;
1581
+ discount_percentage: number | null;
1582
+ quota_limit: number | null; /** @enum {string} */
1583
+ quota_period: "day" | "month" | "week" | "year";
1584
+ requires_member_present: boolean;
1585
+ early_access_days: number | null;
1586
+ active_during_grace: boolean;
1587
+ };
1542
1588
  SyncMember: {
1543
1589
  member_id: string;
1544
1590
  card_id: string | null;
@@ -1547,6 +1593,7 @@ interface components {
1547
1593
  pricing_group_code: string | null; /** @enum {string} */
1548
1594
  membership_status: "active" | "grace_period" | "past_due"; /** Format: date-time */
1549
1595
  end_time: string | null;
1596
+ entitlements: components["schemas"]["MemberEntitlement"][];
1550
1597
  };
1551
1598
  MemberSyncResponse: {
1552
1599
  members: components["schemas"]["SyncMember"][]; /** @example 2026-06-11T12:00:00.000Z */
@@ -1577,18 +1624,6 @@ interface components {
1577
1624
  role: components["schemas"]["MemberRoleSummary"] | null;
1578
1625
  membership: components["schemas"]["MemberMembershipSummary"] | null;
1579
1626
  };
1580
- MemberEntitlement: {
1581
- code: string; /** @enum {string} */
1582
- type: "discount" | "early_access" | "free_entry" | "guest_pass";
1583
- display_name: string;
1584
- plan_entitlement_id: string;
1585
- discount_percentage: number | null;
1586
- quota_limit: number | null; /** @enum {string} */
1587
- quota_period: "day" | "month" | "week" | "year";
1588
- requires_member_present: boolean;
1589
- early_access_days: number | null;
1590
- active_during_grace: boolean;
1591
- };
1592
1627
  ListMemberEntitlementsResponse: {
1593
1628
  entitlements: components["schemas"]["MemberEntitlement"][];
1594
1629
  };
@@ -1608,6 +1643,7 @@ interface components {
1608
1643
  role_code: string;
1609
1644
  };
1610
1645
  AdmitResult: {
1646
+ /** @description Whether the entitlements were filtered by a target context the request supplied. False means no target context was given and they are unfiltered by target. */target_context_applied: boolean;
1611
1647
  actions: ({
1612
1648
  /** @enum {string} */type: "renew_at_desk"; /** Format: uuid */
1613
1649
  membership_id: string;
@@ -1624,6 +1660,45 @@ interface components {
1624
1660
  pricing_group: string | null;
1625
1661
  entitlements: components["schemas"]["MemberEntitlement"][];
1626
1662
  };
1663
+ TargetCode: {
1664
+ /**
1665
+ * @description Machine identifier a gate sends. Lowercase letters, numbers and single underscores; immutable once created, and matched exactly, never normalised.
1666
+ * @example venue_a
1667
+ */
1668
+ code: string; /** @example Venue A */
1669
+ display_name: string;
1670
+ /**
1671
+ * @description How many plan entitlements restrict availability to this target. Populated only when `view=full`.
1672
+ * @example 3
1673
+ */
1674
+ plan_entitlement_count?: number;
1675
+ id: string;
1676
+ description: string | null; /** Format: date-time */
1677
+ create_time: string; /** Format: date-time */
1678
+ update_time: string;
1679
+ };
1680
+ ListTargetCodesResponse: {
1681
+ /**
1682
+ * @description Opaque token for the next page; empty string on the last page.
1683
+ * @example
1684
+ */
1685
+ next_page_token: string;
1686
+ /**
1687
+ * @description Total number of results across all pages.
1688
+ * @example 42
1689
+ */
1690
+ total_size: number;
1691
+ target_codes: components["schemas"]["TargetCode"][];
1692
+ };
1693
+ CreateTargetCodeDto: {
1694
+ /** @example venue_a */code: string;
1695
+ display_name: string;
1696
+ description?: string | null;
1697
+ };
1698
+ UpdateTargetCodeDto: {
1699
+ display_name?: string;
1700
+ description?: string | null;
1701
+ };
1627
1702
  MemberRole: {
1628
1703
  id: string;
1629
1704
  code: string;
@@ -2087,45 +2162,6 @@ interface components {
2087
2162
  total_size: number;
2088
2163
  memberships: components["schemas"]["Membership"][];
2089
2164
  };
2090
- TargetCode: {
2091
- /**
2092
- * @description Machine identifier a gate sends. Lowercase letters, numbers and single underscores; immutable once created, and matched exactly, never normalised.
2093
- * @example venue_a
2094
- */
2095
- code: string; /** @example Venue A */
2096
- display_name: string;
2097
- /**
2098
- * @description How many plan entitlements restrict availability to this target. Populated only when `view=full`.
2099
- * @example 3
2100
- */
2101
- plan_entitlement_count?: number;
2102
- id: string;
2103
- description: string | null; /** Format: date-time */
2104
- create_time: string; /** Format: date-time */
2105
- update_time: string;
2106
- };
2107
- ListTargetCodesResponse: {
2108
- /**
2109
- * @description Opaque token for the next page; empty string on the last page.
2110
- * @example
2111
- */
2112
- next_page_token: string;
2113
- /**
2114
- * @description Total number of results across all pages.
2115
- * @example 42
2116
- */
2117
- total_size: number;
2118
- target_codes: components["schemas"]["TargetCode"][];
2119
- };
2120
- CreateTargetCodeDto: {
2121
- /** @example venue_a */code: string;
2122
- display_name: string;
2123
- description?: string | null;
2124
- };
2125
- UpdateTargetCodeDto: {
2126
- display_name?: string;
2127
- description?: string | null;
2128
- };
2129
2165
  };
2130
2166
  responses: never;
2131
2167
  parameters: never;
@@ -3739,6 +3775,7 @@ interface operations {
3739
3775
  MembersController_listEntitlements: {
3740
3776
  parameters: {
3741
3777
  query?: {
3778
+ /** @description Registered target codes the request is being made at, sent comma-separated (`?targets=venue_a,coffee_shop`). Codes are matched exactly; an unregistered code is refused. Omit for no target context; send it empty to name no targets. */targets?: string[];
3742
3779
  type?: "discount" | "early_access" | "free_entry" | "guest_pass";
3743
3780
  };
3744
3781
  header?: never;
@@ -3755,6 +3792,14 @@ interface operations {
3755
3792
  "application/json": components["schemas"]["ListMemberEntitlementsResponse"];
3756
3793
  };
3757
3794
  };
3795
+ 400: {
3796
+ headers: {
3797
+ [name: string]: unknown;
3798
+ };
3799
+ content: {
3800
+ "application/json": components["schemas"]["ErrorResponse"];
3801
+ };
3802
+ };
3758
3803
  404: {
3759
3804
  headers: {
3760
3805
  [name: string]: unknown;
@@ -3834,6 +3879,7 @@ interface operations {
3834
3879
  AdmitController_check: {
3835
3880
  parameters: {
3836
3881
  query: {
3882
+ /** @description Registered target codes the request is being made at, sent comma-separated (`?targets=venue_a,coffee_shop`). Codes are matched exactly; an unregistered code is refused. Omit for no target context; send it empty to name no targets. */targets?: string[];
3837
3883
  card: string;
3838
3884
  };
3839
3885
  header?: never;
@@ -3850,6 +3896,14 @@ interface operations {
3850
3896
  "application/json": components["schemas"]["AdmitResult"];
3851
3897
  };
3852
3898
  };
3899
+ 400: {
3900
+ headers: {
3901
+ [name: string]: unknown;
3902
+ };
3903
+ content: {
3904
+ "application/json": components["schemas"]["ErrorResponse"];
3905
+ };
3906
+ };
3853
3907
  404: {
3854
3908
  headers: {
3855
3909
  [name: string]: unknown;
@@ -3860,9 +3914,13 @@ interface operations {
3860
3914
  };
3861
3915
  };
3862
3916
  };
3863
- MemberRolesController_list: {
3917
+ TargetCodesController_list: {
3864
3918
  parameters: {
3865
- query?: never;
3919
+ query?: {
3920
+ page_size?: number;
3921
+ page_token?: string; /** @description Response detail level; `full` populates `plan_entitlement_count`. */
3922
+ view?: "basic" | "full";
3923
+ };
3866
3924
  header?: never;
3867
3925
  path?: never;
3868
3926
  cookie?: never;
@@ -3874,12 +3932,12 @@ interface operations {
3874
3932
  [name: string]: unknown;
3875
3933
  };
3876
3934
  content: {
3877
- "application/json": components["schemas"]["ListMemberRolesResponse"];
3935
+ "application/json": components["schemas"]["ListTargetCodesResponse"];
3878
3936
  };
3879
3937
  };
3880
3938
  };
3881
3939
  };
3882
- MemberRolesController_create: {
3940
+ TargetCodesController_create: {
3883
3941
  parameters: {
3884
3942
  query?: never;
3885
3943
  header?: never;
@@ -3888,7 +3946,7 @@ interface operations {
3888
3946
  };
3889
3947
  requestBody: {
3890
3948
  content: {
3891
- "application/json": components["schemas"]["CreateMemberRoleDto"];
3949
+ "application/json": components["schemas"]["CreateTargetCodeDto"];
3892
3950
  };
3893
3951
  };
3894
3952
  responses: {
@@ -3897,14 +3955,32 @@ interface operations {
3897
3955
  [name: string]: unknown;
3898
3956
  };
3899
3957
  content: {
3900
- "application/json": components["schemas"]["MemberRole"];
3958
+ "application/json": components["schemas"]["TargetCode"];
3959
+ };
3960
+ };
3961
+ 400: {
3962
+ headers: {
3963
+ [name: string]: unknown;
3964
+ };
3965
+ content: {
3966
+ "application/json": components["schemas"]["ErrorResponse"];
3967
+ };
3968
+ };
3969
+ 409: {
3970
+ headers: {
3971
+ [name: string]: unknown;
3972
+ };
3973
+ content: {
3974
+ "application/json": components["schemas"]["ErrorResponse"];
3901
3975
  };
3902
3976
  };
3903
3977
  };
3904
3978
  };
3905
- MemberRolesController_get: {
3979
+ TargetCodesController_get: {
3906
3980
  parameters: {
3907
- query?: never;
3981
+ query?: {
3982
+ /** @description Response detail level; `full` populates `plan_entitlement_count`. */view?: "basic" | "full";
3983
+ };
3908
3984
  header?: never;
3909
3985
  path?: never;
3910
3986
  cookie?: never;
@@ -3916,7 +3992,7 @@ interface operations {
3916
3992
  [name: string]: unknown;
3917
3993
  };
3918
3994
  content: {
3919
- "application/json": components["schemas"]["MemberRole"];
3995
+ "application/json": components["schemas"]["TargetCode"];
3920
3996
  };
3921
3997
  };
3922
3998
  404: {
@@ -3929,7 +4005,7 @@ interface operations {
3929
4005
  };
3930
4006
  };
3931
4007
  };
3932
- MemberRolesController_delete: {
4008
+ TargetCodesController_delete: {
3933
4009
  parameters: {
3934
4010
  query?: never;
3935
4011
  header?: never;
@@ -3954,9 +4030,17 @@ interface operations {
3954
4030
  "application/json": components["schemas"]["ErrorResponse"];
3955
4031
  };
3956
4032
  };
4033
+ 409: {
4034
+ headers: {
4035
+ [name: string]: unknown;
4036
+ };
4037
+ content: {
4038
+ "application/json": components["schemas"]["ErrorResponse"];
4039
+ };
4040
+ };
3957
4041
  };
3958
4042
  };
3959
- MemberRolesController_update: {
4043
+ TargetCodesController_update: {
3960
4044
  parameters: {
3961
4045
  query?: never;
3962
4046
  header?: never;
@@ -3965,7 +4049,7 @@ interface operations {
3965
4049
  };
3966
4050
  requestBody: {
3967
4051
  content: {
3968
- "application/json": components["schemas"]["UpdateMemberRoleDto"];
4052
+ "application/json": components["schemas"]["UpdateTargetCodeDto"];
3969
4053
  };
3970
4054
  };
3971
4055
  responses: {
@@ -3974,10 +4058,145 @@ interface operations {
3974
4058
  [name: string]: unknown;
3975
4059
  };
3976
4060
  content: {
3977
- "application/json": components["schemas"]["MemberRole"];
4061
+ "application/json": components["schemas"]["TargetCode"];
3978
4062
  };
3979
4063
  };
3980
- 404: {
4064
+ 400: {
4065
+ headers: {
4066
+ [name: string]: unknown;
4067
+ };
4068
+ content: {
4069
+ "application/json": components["schemas"]["ErrorResponse"];
4070
+ };
4071
+ };
4072
+ 404: {
4073
+ headers: {
4074
+ [name: string]: unknown;
4075
+ };
4076
+ content: {
4077
+ "application/json": components["schemas"]["ErrorResponse"];
4078
+ };
4079
+ };
4080
+ };
4081
+ };
4082
+ MemberRolesController_list: {
4083
+ parameters: {
4084
+ query?: never;
4085
+ header?: never;
4086
+ path?: never;
4087
+ cookie?: never;
4088
+ };
4089
+ requestBody?: never;
4090
+ responses: {
4091
+ 200: {
4092
+ headers: {
4093
+ [name: string]: unknown;
4094
+ };
4095
+ content: {
4096
+ "application/json": components["schemas"]["ListMemberRolesResponse"];
4097
+ };
4098
+ };
4099
+ };
4100
+ };
4101
+ MemberRolesController_create: {
4102
+ parameters: {
4103
+ query?: never;
4104
+ header?: never;
4105
+ path?: never;
4106
+ cookie?: never;
4107
+ };
4108
+ requestBody: {
4109
+ content: {
4110
+ "application/json": components["schemas"]["CreateMemberRoleDto"];
4111
+ };
4112
+ };
4113
+ responses: {
4114
+ 201: {
4115
+ headers: {
4116
+ [name: string]: unknown;
4117
+ };
4118
+ content: {
4119
+ "application/json": components["schemas"]["MemberRole"];
4120
+ };
4121
+ };
4122
+ };
4123
+ };
4124
+ MemberRolesController_get: {
4125
+ parameters: {
4126
+ query?: never;
4127
+ header?: never;
4128
+ path?: never;
4129
+ cookie?: never;
4130
+ };
4131
+ requestBody?: never;
4132
+ responses: {
4133
+ 200: {
4134
+ headers: {
4135
+ [name: string]: unknown;
4136
+ };
4137
+ content: {
4138
+ "application/json": components["schemas"]["MemberRole"];
4139
+ };
4140
+ };
4141
+ 404: {
4142
+ headers: {
4143
+ [name: string]: unknown;
4144
+ };
4145
+ content: {
4146
+ "application/json": components["schemas"]["ErrorResponse"];
4147
+ };
4148
+ };
4149
+ };
4150
+ };
4151
+ MemberRolesController_delete: {
4152
+ parameters: {
4153
+ query?: never;
4154
+ header?: never;
4155
+ path?: never;
4156
+ cookie?: never;
4157
+ };
4158
+ requestBody?: never;
4159
+ responses: {
4160
+ 200: {
4161
+ headers: {
4162
+ [name: string]: unknown;
4163
+ };
4164
+ content: {
4165
+ "application/json": Record<string, never>;
4166
+ };
4167
+ };
4168
+ 404: {
4169
+ headers: {
4170
+ [name: string]: unknown;
4171
+ };
4172
+ content: {
4173
+ "application/json": components["schemas"]["ErrorResponse"];
4174
+ };
4175
+ };
4176
+ };
4177
+ };
4178
+ MemberRolesController_update: {
4179
+ parameters: {
4180
+ query?: never;
4181
+ header?: never;
4182
+ path?: never;
4183
+ cookie?: never;
4184
+ };
4185
+ requestBody: {
4186
+ content: {
4187
+ "application/json": components["schemas"]["UpdateMemberRoleDto"];
4188
+ };
4189
+ };
4190
+ responses: {
4191
+ 200: {
4192
+ headers: {
4193
+ [name: string]: unknown;
4194
+ };
4195
+ content: {
4196
+ "application/json": components["schemas"]["MemberRole"];
4197
+ };
4198
+ };
4199
+ 404: {
3981
4200
  headers: {
3982
4201
  [name: string]: unknown;
3983
4202
  };
@@ -5258,171 +5477,6 @@ interface operations {
5258
5477
  };
5259
5478
  };
5260
5479
  };
5261
- TargetCodesController_list: {
5262
- parameters: {
5263
- query?: {
5264
- page_size?: number;
5265
- page_token?: string; /** @description Response detail level; `full` populates `plan_entitlement_count`. */
5266
- view?: "basic" | "full";
5267
- };
5268
- header?: never;
5269
- path?: never;
5270
- cookie?: never;
5271
- };
5272
- requestBody?: never;
5273
- responses: {
5274
- 200: {
5275
- headers: {
5276
- [name: string]: unknown;
5277
- };
5278
- content: {
5279
- "application/json": components["schemas"]["ListTargetCodesResponse"];
5280
- };
5281
- };
5282
- };
5283
- };
5284
- TargetCodesController_create: {
5285
- parameters: {
5286
- query?: never;
5287
- header?: never;
5288
- path?: never;
5289
- cookie?: never;
5290
- };
5291
- requestBody: {
5292
- content: {
5293
- "application/json": components["schemas"]["CreateTargetCodeDto"];
5294
- };
5295
- };
5296
- responses: {
5297
- 201: {
5298
- headers: {
5299
- [name: string]: unknown;
5300
- };
5301
- content: {
5302
- "application/json": components["schemas"]["TargetCode"];
5303
- };
5304
- };
5305
- 400: {
5306
- headers: {
5307
- [name: string]: unknown;
5308
- };
5309
- content: {
5310
- "application/json": components["schemas"]["ErrorResponse"];
5311
- };
5312
- };
5313
- 409: {
5314
- headers: {
5315
- [name: string]: unknown;
5316
- };
5317
- content: {
5318
- "application/json": components["schemas"]["ErrorResponse"];
5319
- };
5320
- };
5321
- };
5322
- };
5323
- TargetCodesController_get: {
5324
- parameters: {
5325
- query?: {
5326
- /** @description Response detail level; `full` populates `plan_entitlement_count`. */view?: "basic" | "full";
5327
- };
5328
- header?: never;
5329
- path?: never;
5330
- cookie?: never;
5331
- };
5332
- requestBody?: never;
5333
- responses: {
5334
- 200: {
5335
- headers: {
5336
- [name: string]: unknown;
5337
- };
5338
- content: {
5339
- "application/json": components["schemas"]["TargetCode"];
5340
- };
5341
- };
5342
- 404: {
5343
- headers: {
5344
- [name: string]: unknown;
5345
- };
5346
- content: {
5347
- "application/json": components["schemas"]["ErrorResponse"];
5348
- };
5349
- };
5350
- };
5351
- };
5352
- TargetCodesController_delete: {
5353
- parameters: {
5354
- query?: never;
5355
- header?: never;
5356
- path?: never;
5357
- cookie?: never;
5358
- };
5359
- requestBody?: never;
5360
- responses: {
5361
- 200: {
5362
- headers: {
5363
- [name: string]: unknown;
5364
- };
5365
- content: {
5366
- "application/json": Record<string, never>;
5367
- };
5368
- };
5369
- 404: {
5370
- headers: {
5371
- [name: string]: unknown;
5372
- };
5373
- content: {
5374
- "application/json": components["schemas"]["ErrorResponse"];
5375
- };
5376
- };
5377
- 409: {
5378
- headers: {
5379
- [name: string]: unknown;
5380
- };
5381
- content: {
5382
- "application/json": components["schemas"]["ErrorResponse"];
5383
- };
5384
- };
5385
- };
5386
- };
5387
- TargetCodesController_update: {
5388
- parameters: {
5389
- query?: never;
5390
- header?: never;
5391
- path?: never;
5392
- cookie?: never;
5393
- };
5394
- requestBody: {
5395
- content: {
5396
- "application/json": components["schemas"]["UpdateTargetCodeDto"];
5397
- };
5398
- };
5399
- responses: {
5400
- 200: {
5401
- headers: {
5402
- [name: string]: unknown;
5403
- };
5404
- content: {
5405
- "application/json": components["schemas"]["TargetCode"];
5406
- };
5407
- };
5408
- 400: {
5409
- headers: {
5410
- [name: string]: unknown;
5411
- };
5412
- content: {
5413
- "application/json": components["schemas"]["ErrorResponse"];
5414
- };
5415
- };
5416
- 404: {
5417
- headers: {
5418
- [name: string]: unknown;
5419
- };
5420
- content: {
5421
- "application/json": components["schemas"]["ErrorResponse"];
5422
- };
5423
- };
5424
- };
5425
- };
5426
5480
  InngestController_handle_get: {
5427
5481
  parameters: {
5428
5482
  query?: never;
@@ -5592,6 +5646,8 @@ type PlanChangeResult = Schemas['PlanChangeResponseDto'];
5592
5646
  type MemberSyncResponse = Schemas['MemberSyncResponse'];
5593
5647
  type RedeemEntitlementResponse = Schemas['RedeemEntitlementResponseDto'];
5594
5648
  type CustomerView = 'basic' | 'full';
5649
+ type CalendarView = 'basic' | 'full';
5650
+ type TargetCodeView = 'basic' | 'full';
5595
5651
  interface PageParams {
5596
5652
  /** Rows per page. Server default 50; capped at 250. */
5597
5653
  page_size?: number;
@@ -5655,9 +5711,25 @@ declare class APIResource {
5655
5711
  //#endregion
5656
5712
  //#region src/resources/admit.d.ts
5657
5713
  declare class AdmitResource extends APIResource {
5658
- /** Gate admission check: `GET /admit?card=<cardId>`. */
5714
+ /**
5715
+ * Gate admission check: `GET /admit?card=<cardId>`.
5716
+ *
5717
+ * `targets` names the venue, zone, shop or gate the request is being made
5718
+ * at, and is the context the entitlements are judged in — a benefit
5719
+ * restricted to somewhere else drops out of `entitlements`. Three states,
5720
+ * and they are answered differently: omit it and every target restriction
5721
+ * is treated as satisfied; pass `[]` and only benefits valid anywhere
5722
+ * survive; pass codes and a benefit needs one of them. Read
5723
+ * `target_context_applied` on the result to tell the first apart from the
5724
+ * other two.
5725
+ *
5726
+ * Codes are matched exactly, so send them back verbatim from
5727
+ * `targetCodes.list()` — an unregistered or miscased code is refused with
5728
+ * a 400 rather than quietly ignored.
5729
+ */
5659
5730
  check(params: {
5660
5731
  card: string;
5732
+ targets?: string[];
5661
5733
  }, options?: RequestOptions): Promise<AdmitResult>;
5662
5734
  }
5663
5735
  //#endregion
@@ -5679,7 +5751,7 @@ declare class BillingOptionsResource extends APIResource {
5679
5751
  //#endregion
5680
5752
  //#region src/resources/calendar-rules.d.ts
5681
5753
  /**
5682
- * A calendar rule is one row of a calendar's date vocabulary. Conditions AND
5754
+ * A calendar rule is one row of a calendar's set of dates. Conditions AND
5683
5755
  * within a rule and rules OR across a calendar, so "weekends in August" is a
5684
5756
  * single rule rather than two.
5685
5757
  *
@@ -5695,14 +5767,25 @@ declare class CalendarRulesResource extends APIResource {
5695
5767
  //#endregion
5696
5768
  //#region src/resources/calendars.d.ts
5697
5769
  /**
5698
- * Calendars are named, reusable date vocabularies ("Peak 2026", "Weekends").
5770
+ * Calendars are named, reusable sets of dates ("Peak 2026", "Weekends").
5699
5771
  * The dates themselves live in the rules attached to them.
5700
5772
  *
5701
5773
  * A calendar containing no rules is valid for **all** dates, not none.
5702
5774
  */
5703
5775
  declare class CalendarsResource extends APIResource {
5704
- list(params?: PageParams, options?: RequestOptions): Promise<Page<Calendar>>;
5705
- get(id: string, options?: RequestOptions): Promise<Calendar>;
5776
+ /**
5777
+ * Pass `view: 'full'` to include `plan_entitlement_count` on every
5778
+ * calendar.
5779
+ */
5780
+ list(params?: PageParams & {
5781
+ view?: CalendarView;
5782
+ }, options?: RequestOptions): Promise<Page<Calendar>>;
5783
+ /**
5784
+ * Pass `view: 'full'` to include `plan_entitlement_count`.
5785
+ */
5786
+ get(id: string, params?: {
5787
+ view?: CalendarView;
5788
+ }, options?: RequestOptions): Promise<Calendar>;
5706
5789
  create(params: CreateCalendarParams, options?: RequestOptions): Promise<Calendar>;
5707
5790
  update(id: string, params: UpdateCalendarParams, options?: RequestOptions): Promise<Calendar>;
5708
5791
  delete(id: string, options?: RequestOptions): Promise<void>;
@@ -5741,6 +5824,14 @@ declare class EntitlementsResource extends APIResource {
5741
5824
  /**
5742
5825
  * Fire-and-forget batch usage reporting (one row per member). Idempotent
5743
5826
  * per (key, member). Returns the recorded usage rows.
5827
+ *
5828
+ * `target` is the single registered code for the venue, zone, shop or gate
5829
+ * the usage happened at — one event, one place, which is why it is
5830
+ * singular here where the reads take `targets`. It is both the context the
5831
+ * entitlement is judged in and a column on the row that comes back, so it
5832
+ * is queryable in a way the free-form `context` is not. It is part of the
5833
+ * idempotency fingerprint: a replay of the same key at a different target
5834
+ * is refused rather than silently returning the original row.
5744
5835
  */
5745
5836
  recordUsage(params: RecordUsageParams, options?: IdempotentRequestOptions): Promise<EntitlementUsage[]>;
5746
5837
  list(options?: RequestOptions): Promise<Entitlement[]>;
@@ -5769,8 +5860,24 @@ declare class MembersResource extends APIResource {
5769
5860
  since?: string;
5770
5861
  }, options?: RequestOptions): Promise<MemberSyncResponse>;
5771
5862
  get(id: string, options?: RequestOptions): Promise<Member>;
5863
+ /**
5864
+ * The entitlements a member can use right now.
5865
+ *
5866
+ * `targets` filters the result down to the benefits valid at the venue,
5867
+ * zone, shop or gate it names — the same codes `admit.check` takes, but
5868
+ * read as a filter here rather than as the context a gate decision is made
5869
+ * in. Three states: omit it and nothing is filtered by target; pass `[]`
5870
+ * and only benefits valid anywhere come back; pass codes and a benefit
5871
+ * needs one of them. Codes are matched exactly, so send them back verbatim
5872
+ * from `targetCodes.list()` — an unregistered one is refused with a 400.
5873
+ *
5874
+ * Each entitlement carries `valid_on` and `valid_at` when something
5875
+ * restricts it by date or by target; both list only what it matched, never
5876
+ * what it failed.
5877
+ */
5772
5878
  listEntitlements(id: string, params?: {
5773
5879
  type?: EntitlementType;
5880
+ targets?: string[];
5774
5881
  }, options?: RequestOptions): Promise<MemberEntitlement[]>;
5775
5882
  /**
5776
5883
  * Updates a member's details. Accepts `name`, `date_of_birth` and `role`
@@ -5921,13 +6028,24 @@ declare class SalesChannelsResource extends APIResource {
5921
6028
  //#endregion
5922
6029
  //#region src/resources/target-codes.d.ts
5923
6030
  /**
5924
- * The registered vocabulary of locations a gate can report (`venue_a`,
5925
- * `coffee_shop`). Codes are matched exactly — list them and send values back
5926
- * verbatim rather than constructing or case-folding them.
6031
+ * The registered code for each venue, zone, shop or gate a request can name
6032
+ * (`venue_a`, `coffee_shop`). Codes are matched exactly — list them and send
6033
+ * values back verbatim rather than constructing or case-folding them.
5927
6034
  */
5928
6035
  declare class TargetCodesResource extends APIResource {
5929
- list(params?: PageParams, options?: RequestOptions): Promise<Page<TargetCode>>;
5930
- get(id: string, options?: RequestOptions): Promise<TargetCode>;
6036
+ /**
6037
+ * Pass `view: 'full'` to include `plan_entitlement_count` on every target
6038
+ * code.
6039
+ */
6040
+ list(params?: PageParams & {
6041
+ view?: TargetCodeView;
6042
+ }, options?: RequestOptions): Promise<Page<TargetCode>>;
6043
+ /**
6044
+ * Pass `view: 'full'` to include `plan_entitlement_count`.
6045
+ */
6046
+ get(id: string, params?: {
6047
+ view?: TargetCodeView;
6048
+ }, options?: RequestOptions): Promise<TargetCode>;
5931
6049
  /**
5932
6050
  * `code` is lowercase letters and digits with single underscores between
5933
6051
  * segments, at least one letter, 2–64 characters. Anything else is refused
@@ -6106,4 +6224,4 @@ declare function paginate<T>(fetchPage: (params: PageParams) => Promise<Page<T>>
6106
6224
  */
6107
6225
  declare function collect<T>(fetchPage: (params: PageParams) => Promise<Page<T>>, params?: PageParams): Promise<T[]>;
6108
6226
  //#endregion
6109
- export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, SyncMember, TargetCode, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
6227
+ export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };