@ophelio/sdk 0.3.2 → 0.5.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;
@@ -1616,7 +1652,7 @@ interface components {
1616
1652
  reason: string;
1617
1653
  })[];
1618
1654
  admitted: boolean; /** @enum {string|null} */
1619
- deny_reason: "card_not_found" | "member_removed" | "membership_cancelled" | "membership_expired" | "membership_incomplete" | "payment_overdue" | null;
1655
+ deny_reason: "card_not_found" | "free_entry_not_granted" | "free_entry_unavailable" | "member_removed" | "membership_cancelled" | "membership_expired" | "membership_incomplete" | "payment_overdue" | null;
1620
1656
  member: components["schemas"]["AdmitMember"] | null;
1621
1657
  membership_id: string | null; /** @enum {string|null} */
1622
1658
  membership_status: "active" | "cancelled" | "expired" | "grace_period" | "incomplete" | "past_due" | null;
@@ -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;
@@ -3293,6 +3329,14 @@ interface operations {
3293
3329
  "application/json": components["schemas"]["ErrorResponse"];
3294
3330
  };
3295
3331
  };
3332
+ 409: {
3333
+ headers: {
3334
+ [name: string]: unknown;
3335
+ };
3336
+ content: {
3337
+ "application/json": components["schemas"]["ErrorResponse"];
3338
+ };
3339
+ };
3296
3340
  };
3297
3341
  };
3298
3342
  PlanEntitlementAvailabilitiesController_get: {
@@ -3386,6 +3430,14 @@ interface operations {
3386
3430
  "application/json": components["schemas"]["ErrorResponse"];
3387
3431
  };
3388
3432
  };
3433
+ 409: {
3434
+ headers: {
3435
+ [name: string]: unknown;
3436
+ };
3437
+ content: {
3438
+ "application/json": components["schemas"]["ErrorResponse"];
3439
+ };
3440
+ };
3389
3441
  };
3390
3442
  };
3391
3443
  PlanPricingGroupMappingsController_delete: {
@@ -3635,6 +3687,7 @@ interface operations {
3635
3687
  MembersController_sync: {
3636
3688
  parameters: {
3637
3689
  query?: {
3690
+ /** @description Registered target codes of the place this roster is for, sent comma-separated (`?targets=venue_a,coffee_shop`). Each member's entitlements are then narrowed to those usable there. Codes are matched exactly; an unregistered code is refused. Omit the parameter to receive the whole roster, with entitlements narrowed by date alone. Sending it with nothing in it (`?targets=`) is an error here, unlike on `GET /admit` and `GET /members/:id/entitlements`, where it means the caller named no place: this roster is used during an outage without being checked again, so an empty value would leave a gate short of entitlements it would not discover until the outage it kept the roster for. */targets?: string[];
3638
3691
  since?: string;
3639
3692
  };
3640
3693
  header?: never;
@@ -3651,6 +3704,14 @@ interface operations {
3651
3704
  "application/json": components["schemas"]["MemberSyncResponse"];
3652
3705
  };
3653
3706
  };
3707
+ 400: {
3708
+ headers: {
3709
+ [name: string]: unknown;
3710
+ };
3711
+ content: {
3712
+ "application/json": components["schemas"]["ErrorResponse"];
3713
+ };
3714
+ };
3654
3715
  };
3655
3716
  };
3656
3717
  MembersController_get: {
@@ -3739,6 +3800,7 @@ interface operations {
3739
3800
  MembersController_listEntitlements: {
3740
3801
  parameters: {
3741
3802
  query?: {
3803
+ /** @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
3804
  type?: "discount" | "early_access" | "free_entry" | "guest_pass";
3743
3805
  };
3744
3806
  header?: never;
@@ -3755,6 +3817,14 @@ interface operations {
3755
3817
  "application/json": components["schemas"]["ListMemberEntitlementsResponse"];
3756
3818
  };
3757
3819
  };
3820
+ 400: {
3821
+ headers: {
3822
+ [name: string]: unknown;
3823
+ };
3824
+ content: {
3825
+ "application/json": components["schemas"]["ErrorResponse"];
3826
+ };
3827
+ };
3758
3828
  404: {
3759
3829
  headers: {
3760
3830
  [name: string]: unknown;
@@ -3834,6 +3904,7 @@ interface operations {
3834
3904
  AdmitController_check: {
3835
3905
  parameters: {
3836
3906
  query: {
3907
+ /** @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
3908
  card: string;
3838
3909
  };
3839
3910
  header?: never;
@@ -3850,6 +3921,14 @@ interface operations {
3850
3921
  "application/json": components["schemas"]["AdmitResult"];
3851
3922
  };
3852
3923
  };
3924
+ 400: {
3925
+ headers: {
3926
+ [name: string]: unknown;
3927
+ };
3928
+ content: {
3929
+ "application/json": components["schemas"]["ErrorResponse"];
3930
+ };
3931
+ };
3853
3932
  404: {
3854
3933
  headers: {
3855
3934
  [name: string]: unknown;
@@ -3860,9 +3939,13 @@ interface operations {
3860
3939
  };
3861
3940
  };
3862
3941
  };
3863
- MemberRolesController_list: {
3942
+ TargetCodesController_list: {
3864
3943
  parameters: {
3865
- query?: never;
3944
+ query?: {
3945
+ page_size?: number;
3946
+ page_token?: string; /** @description Response detail level; `full` populates `plan_entitlement_count`. */
3947
+ view?: "basic" | "full";
3948
+ };
3866
3949
  header?: never;
3867
3950
  path?: never;
3868
3951
  cookie?: never;
@@ -3874,12 +3957,12 @@ interface operations {
3874
3957
  [name: string]: unknown;
3875
3958
  };
3876
3959
  content: {
3877
- "application/json": components["schemas"]["ListMemberRolesResponse"];
3960
+ "application/json": components["schemas"]["ListTargetCodesResponse"];
3878
3961
  };
3879
3962
  };
3880
3963
  };
3881
3964
  };
3882
- MemberRolesController_create: {
3965
+ TargetCodesController_create: {
3883
3966
  parameters: {
3884
3967
  query?: never;
3885
3968
  header?: never;
@@ -3888,7 +3971,7 @@ interface operations {
3888
3971
  };
3889
3972
  requestBody: {
3890
3973
  content: {
3891
- "application/json": components["schemas"]["CreateMemberRoleDto"];
3974
+ "application/json": components["schemas"]["CreateTargetCodeDto"];
3892
3975
  };
3893
3976
  };
3894
3977
  responses: {
@@ -3897,29 +3980,190 @@ interface operations {
3897
3980
  [name: string]: unknown;
3898
3981
  };
3899
3982
  content: {
3900
- "application/json": components["schemas"]["MemberRole"];
3983
+ "application/json": components["schemas"]["TargetCode"];
3901
3984
  };
3902
3985
  };
3903
- };
3904
- };
3905
- MemberRolesController_get: {
3906
- parameters: {
3907
- query?: never;
3908
- header?: never;
3909
- path?: never;
3910
- cookie?: never;
3911
- };
3912
- requestBody?: never;
3913
- responses: {
3914
- 200: {
3986
+ 400: {
3915
3987
  headers: {
3916
3988
  [name: string]: unknown;
3917
3989
  };
3918
3990
  content: {
3919
- "application/json": components["schemas"]["MemberRole"];
3991
+ "application/json": components["schemas"]["ErrorResponse"];
3920
3992
  };
3921
3993
  };
3922
- 404: {
3994
+ 409: {
3995
+ headers: {
3996
+ [name: string]: unknown;
3997
+ };
3998
+ content: {
3999
+ "application/json": components["schemas"]["ErrorResponse"];
4000
+ };
4001
+ };
4002
+ };
4003
+ };
4004
+ TargetCodesController_get: {
4005
+ parameters: {
4006
+ query?: {
4007
+ /** @description Response detail level; `full` populates `plan_entitlement_count`. */view?: "basic" | "full";
4008
+ };
4009
+ header?: never;
4010
+ path?: never;
4011
+ cookie?: never;
4012
+ };
4013
+ requestBody?: never;
4014
+ responses: {
4015
+ 200: {
4016
+ headers: {
4017
+ [name: string]: unknown;
4018
+ };
4019
+ content: {
4020
+ "application/json": components["schemas"]["TargetCode"];
4021
+ };
4022
+ };
4023
+ 404: {
4024
+ headers: {
4025
+ [name: string]: unknown;
4026
+ };
4027
+ content: {
4028
+ "application/json": components["schemas"]["ErrorResponse"];
4029
+ };
4030
+ };
4031
+ };
4032
+ };
4033
+ TargetCodesController_delete: {
4034
+ parameters: {
4035
+ query?: never;
4036
+ header?: never;
4037
+ path?: never;
4038
+ cookie?: never;
4039
+ };
4040
+ requestBody?: never;
4041
+ responses: {
4042
+ 200: {
4043
+ headers: {
4044
+ [name: string]: unknown;
4045
+ };
4046
+ content: {
4047
+ "application/json": Record<string, never>;
4048
+ };
4049
+ };
4050
+ 404: {
4051
+ headers: {
4052
+ [name: string]: unknown;
4053
+ };
4054
+ content: {
4055
+ "application/json": components["schemas"]["ErrorResponse"];
4056
+ };
4057
+ };
4058
+ 409: {
4059
+ headers: {
4060
+ [name: string]: unknown;
4061
+ };
4062
+ content: {
4063
+ "application/json": components["schemas"]["ErrorResponse"];
4064
+ };
4065
+ };
4066
+ };
4067
+ };
4068
+ TargetCodesController_update: {
4069
+ parameters: {
4070
+ query?: never;
4071
+ header?: never;
4072
+ path?: never;
4073
+ cookie?: never;
4074
+ };
4075
+ requestBody: {
4076
+ content: {
4077
+ "application/json": components["schemas"]["UpdateTargetCodeDto"];
4078
+ };
4079
+ };
4080
+ responses: {
4081
+ 200: {
4082
+ headers: {
4083
+ [name: string]: unknown;
4084
+ };
4085
+ content: {
4086
+ "application/json": components["schemas"]["TargetCode"];
4087
+ };
4088
+ };
4089
+ 400: {
4090
+ headers: {
4091
+ [name: string]: unknown;
4092
+ };
4093
+ content: {
4094
+ "application/json": components["schemas"]["ErrorResponse"];
4095
+ };
4096
+ };
4097
+ 404: {
4098
+ headers: {
4099
+ [name: string]: unknown;
4100
+ };
4101
+ content: {
4102
+ "application/json": components["schemas"]["ErrorResponse"];
4103
+ };
4104
+ };
4105
+ };
4106
+ };
4107
+ MemberRolesController_list: {
4108
+ parameters: {
4109
+ query?: never;
4110
+ header?: never;
4111
+ path?: never;
4112
+ cookie?: never;
4113
+ };
4114
+ requestBody?: never;
4115
+ responses: {
4116
+ 200: {
4117
+ headers: {
4118
+ [name: string]: unknown;
4119
+ };
4120
+ content: {
4121
+ "application/json": components["schemas"]["ListMemberRolesResponse"];
4122
+ };
4123
+ };
4124
+ };
4125
+ };
4126
+ MemberRolesController_create: {
4127
+ parameters: {
4128
+ query?: never;
4129
+ header?: never;
4130
+ path?: never;
4131
+ cookie?: never;
4132
+ };
4133
+ requestBody: {
4134
+ content: {
4135
+ "application/json": components["schemas"]["CreateMemberRoleDto"];
4136
+ };
4137
+ };
4138
+ responses: {
4139
+ 201: {
4140
+ headers: {
4141
+ [name: string]: unknown;
4142
+ };
4143
+ content: {
4144
+ "application/json": components["schemas"]["MemberRole"];
4145
+ };
4146
+ };
4147
+ };
4148
+ };
4149
+ MemberRolesController_get: {
4150
+ parameters: {
4151
+ query?: never;
4152
+ header?: never;
4153
+ path?: never;
4154
+ cookie?: never;
4155
+ };
4156
+ requestBody?: never;
4157
+ responses: {
4158
+ 200: {
4159
+ headers: {
4160
+ [name: string]: unknown;
4161
+ };
4162
+ content: {
4163
+ "application/json": components["schemas"]["MemberRole"];
4164
+ };
4165
+ };
4166
+ 404: {
3923
4167
  headers: {
3924
4168
  [name: string]: unknown;
3925
4169
  };
@@ -4549,6 +4793,14 @@ interface operations {
4549
4793
  "application/json": components["schemas"]["ErrorResponse"];
4550
4794
  };
4551
4795
  };
4796
+ 409: {
4797
+ headers: {
4798
+ [name: string]: unknown;
4799
+ };
4800
+ content: {
4801
+ "application/json": components["schemas"]["ErrorResponse"];
4802
+ };
4803
+ };
4552
4804
  };
4553
4805
  };
4554
4806
  CalendarRulesController_update: {
@@ -5258,171 +5510,6 @@ interface operations {
5258
5510
  };
5259
5511
  };
5260
5512
  };
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
5513
  InngestController_handle_get: {
5427
5514
  parameters: {
5428
5515
  query?: never;
@@ -5592,6 +5679,8 @@ type PlanChangeResult = Schemas['PlanChangeResponseDto'];
5592
5679
  type MemberSyncResponse = Schemas['MemberSyncResponse'];
5593
5680
  type RedeemEntitlementResponse = Schemas['RedeemEntitlementResponseDto'];
5594
5681
  type CustomerView = 'basic' | 'full';
5682
+ type CalendarView = 'basic' | 'full';
5683
+ type TargetCodeView = 'basic' | 'full';
5595
5684
  interface PageParams {
5596
5685
  /** Rows per page. Server default 50; capped at 250. */
5597
5686
  page_size?: number;
@@ -5655,9 +5744,25 @@ declare class APIResource {
5655
5744
  //#endregion
5656
5745
  //#region src/resources/admit.d.ts
5657
5746
  declare class AdmitResource extends APIResource {
5658
- /** Gate admission check: `GET /admit?card=<cardId>`. */
5747
+ /**
5748
+ * Gate admission check: `GET /admit?card=<cardId>`.
5749
+ *
5750
+ * `targets` names the venue, zone, shop or gate the request is being made
5751
+ * at, and is the context the entitlements are judged in — a benefit
5752
+ * restricted to somewhere else drops out of `entitlements`. Three states,
5753
+ * and they are answered differently: omit it and every target restriction
5754
+ * is treated as satisfied; pass `[]` and only benefits valid anywhere
5755
+ * survive; pass codes and a benefit needs one of them. Read
5756
+ * `target_context_applied` on the result to tell the first apart from the
5757
+ * other two.
5758
+ *
5759
+ * Codes are matched exactly, so send them back verbatim from
5760
+ * `targetCodes.list()` — an unregistered or miscased code is refused with
5761
+ * a 400 rather than quietly ignored.
5762
+ */
5659
5763
  check(params: {
5660
5764
  card: string;
5765
+ targets?: string[];
5661
5766
  }, options?: RequestOptions): Promise<AdmitResult>;
5662
5767
  }
5663
5768
  //#endregion
@@ -5679,7 +5784,7 @@ declare class BillingOptionsResource extends APIResource {
5679
5784
  //#endregion
5680
5785
  //#region src/resources/calendar-rules.d.ts
5681
5786
  /**
5682
- * A calendar rule is one row of a calendar's date vocabulary. Conditions AND
5787
+ * A calendar rule is one row of a calendar's set of dates. Conditions AND
5683
5788
  * within a rule and rules OR across a calendar, so "weekends in August" is a
5684
5789
  * single rule rather than two.
5685
5790
  *
@@ -5695,14 +5800,25 @@ declare class CalendarRulesResource extends APIResource {
5695
5800
  //#endregion
5696
5801
  //#region src/resources/calendars.d.ts
5697
5802
  /**
5698
- * Calendars are named, reusable date vocabularies ("Peak 2026", "Weekends").
5803
+ * Calendars are named, reusable sets of dates ("Peak 2026", "Weekends").
5699
5804
  * The dates themselves live in the rules attached to them.
5700
5805
  *
5701
5806
  * A calendar containing no rules is valid for **all** dates, not none.
5702
5807
  */
5703
5808
  declare class CalendarsResource extends APIResource {
5704
- list(params?: PageParams, options?: RequestOptions): Promise<Page<Calendar>>;
5705
- get(id: string, options?: RequestOptions): Promise<Calendar>;
5809
+ /**
5810
+ * Pass `view: 'full'` to include `plan_entitlement_count` on every
5811
+ * calendar.
5812
+ */
5813
+ list(params?: PageParams & {
5814
+ view?: CalendarView;
5815
+ }, options?: RequestOptions): Promise<Page<Calendar>>;
5816
+ /**
5817
+ * Pass `view: 'full'` to include `plan_entitlement_count`.
5818
+ */
5819
+ get(id: string, params?: {
5820
+ view?: CalendarView;
5821
+ }, options?: RequestOptions): Promise<Calendar>;
5706
5822
  create(params: CreateCalendarParams, options?: RequestOptions): Promise<Calendar>;
5707
5823
  update(id: string, params: UpdateCalendarParams, options?: RequestOptions): Promise<Calendar>;
5708
5824
  delete(id: string, options?: RequestOptions): Promise<void>;
@@ -5741,6 +5857,14 @@ declare class EntitlementsResource extends APIResource {
5741
5857
  /**
5742
5858
  * Fire-and-forget batch usage reporting (one row per member). Idempotent
5743
5859
  * per (key, member). Returns the recorded usage rows.
5860
+ *
5861
+ * `target` is the single registered code for the venue, zone, shop or gate
5862
+ * the usage happened at — one event, one place, which is why it is
5863
+ * singular here where the reads take `targets`. It is both the context the
5864
+ * entitlement is judged in and a column on the row that comes back, so it
5865
+ * is queryable in a way the free-form `context` is not. It is part of the
5866
+ * idempotency fingerprint: a replay of the same key at a different target
5867
+ * is refused rather than silently returning the original row.
5744
5868
  */
5745
5869
  recordUsage(params: RecordUsageParams, options?: IdempotentRequestOptions): Promise<EntitlementUsage[]>;
5746
5870
  list(options?: RequestOptions): Promise<Entitlement[]>;
@@ -5769,8 +5893,24 @@ declare class MembersResource extends APIResource {
5769
5893
  since?: string;
5770
5894
  }, options?: RequestOptions): Promise<MemberSyncResponse>;
5771
5895
  get(id: string, options?: RequestOptions): Promise<Member>;
5896
+ /**
5897
+ * The entitlements a member can use right now.
5898
+ *
5899
+ * `targets` filters the result down to the benefits valid at the venue,
5900
+ * zone, shop or gate it names — the same codes `admit.check` takes, but
5901
+ * read as a filter here rather than as the context a gate decision is made
5902
+ * in. Three states: omit it and nothing is filtered by target; pass `[]`
5903
+ * and only benefits valid anywhere come back; pass codes and a benefit
5904
+ * needs one of them. Codes are matched exactly, so send them back verbatim
5905
+ * from `targetCodes.list()` — an unregistered one is refused with a 400.
5906
+ *
5907
+ * Each entitlement carries `valid_on` and `valid_at` when something
5908
+ * restricts it by date or by target; both list only what it matched, never
5909
+ * what it failed.
5910
+ */
5772
5911
  listEntitlements(id: string, params?: {
5773
5912
  type?: EntitlementType;
5913
+ targets?: string[];
5774
5914
  }, options?: RequestOptions): Promise<MemberEntitlement[]>;
5775
5915
  /**
5776
5916
  * Updates a member's details. Accepts `name`, `date_of_birth` and `role`
@@ -5921,13 +6061,24 @@ declare class SalesChannelsResource extends APIResource {
5921
6061
  //#endregion
5922
6062
  //#region src/resources/target-codes.d.ts
5923
6063
  /**
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.
6064
+ * The registered code for each venue, zone, shop or gate a request can name
6065
+ * (`venue_a`, `coffee_shop`). Codes are matched exactly — list them and send
6066
+ * values back verbatim rather than constructing or case-folding them.
5927
6067
  */
5928
6068
  declare class TargetCodesResource extends APIResource {
5929
- list(params?: PageParams, options?: RequestOptions): Promise<Page<TargetCode>>;
5930
- get(id: string, options?: RequestOptions): Promise<TargetCode>;
6069
+ /**
6070
+ * Pass `view: 'full'` to include `plan_entitlement_count` on every target
6071
+ * code.
6072
+ */
6073
+ list(params?: PageParams & {
6074
+ view?: TargetCodeView;
6075
+ }, options?: RequestOptions): Promise<Page<TargetCode>>;
6076
+ /**
6077
+ * Pass `view: 'full'` to include `plan_entitlement_count`.
6078
+ */
6079
+ get(id: string, params?: {
6080
+ view?: TargetCodeView;
6081
+ }, options?: RequestOptions): Promise<TargetCode>;
5931
6082
  /**
5932
6083
  * `code` is lowercase letters and digits with single underscores between
5933
6084
  * segments, at least one letter, 2–64 characters. Anything else is refused
@@ -6106,4 +6257,4 @@ declare function paginate<T>(fetchPage: (params: PageParams) => Promise<Page<T>>
6106
6257
  */
6107
6258
  declare function collect<T>(fetchPage: (params: PageParams) => Promise<Page<T>>, params?: PageParams): Promise<T[]>;
6108
6259
  //#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 };
6260
+ 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 };