@paygentic/sdk 0.10.1 → 0.10.3

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.
Files changed (139) hide show
  1. package/dist/commonjs/funcs/billableMetricsCreate.js +2 -2
  2. package/dist/commonjs/funcs/billableMetricsCreate.js.map +1 -1
  3. package/dist/commonjs/funcs/billableMetricsListEvents.js +2 -2
  4. package/dist/commonjs/funcs/billableMetricsListEvents.js.map +1 -1
  5. package/dist/commonjs/funcs/billableMetricsMeter.js +2 -2
  6. package/dist/commonjs/funcs/billableMetricsMeter.js.map +1 -1
  7. package/dist/commonjs/funcs/costsCreateCost.js +2 -2
  8. package/dist/commonjs/funcs/costsCreateCost.js.map +1 -1
  9. package/dist/commonjs/funcs/entitlementsList.js +2 -2
  10. package/dist/commonjs/funcs/entitlementsList.js.map +1 -1
  11. package/dist/commonjs/funcs/eventsIngest.js +2 -2
  12. package/dist/commonjs/funcs/eventsIngest.js.map +1 -1
  13. package/dist/commonjs/funcs/feesCreate.js +2 -2
  14. package/dist/commonjs/funcs/feesCreate.js.map +1 -1
  15. package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts +1 -1
  16. package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js +1 -1
  17. package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts +1 -1
  18. package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js +1 -1
  19. package/dist/commonjs/funcs/merchantIntegrationsUpsertMerchantIntegration.js +2 -2
  20. package/dist/commonjs/funcs/merchantIntegrationsUpsertMerchantIntegration.js.map +1 -1
  21. package/dist/commonjs/funcs/merchantsReset.js +2 -2
  22. package/dist/commonjs/funcs/merchantsReset.js.map +1 -1
  23. package/dist/commonjs/funcs/paymentsCreate.js +2 -2
  24. package/dist/commonjs/funcs/paymentsCreate.js.map +1 -1
  25. package/dist/commonjs/funcs/plansCreate.js +2 -2
  26. package/dist/commonjs/funcs/plansCreate.js.map +1 -1
  27. package/dist/commonjs/funcs/productsCreate.js +2 -2
  28. package/dist/commonjs/funcs/productsCreate.js.map +1 -1
  29. package/dist/commonjs/funcs/testClocksCreate.js +2 -2
  30. package/dist/commonjs/funcs/testClocksCreate.js.map +1 -1
  31. package/dist/commonjs/funcs/webhooksEnable.js +2 -2
  32. package/dist/commonjs/funcs/webhooksEnable.js.map +1 -1
  33. package/dist/commonjs/funcs/webhooksGetPortal.d.ts +1 -1
  34. package/dist/commonjs/funcs/webhooksGetPortal.js +1 -1
  35. package/dist/commonjs/lib/config.d.ts +2 -2
  36. package/dist/commonjs/lib/config.js +2 -2
  37. package/dist/commonjs/models/costreportresponse.d.ts +14 -2
  38. package/dist/commonjs/models/costreportresponse.d.ts.map +1 -1
  39. package/dist/commonjs/models/costreportresponse.js.map +1 -1
  40. package/dist/commonjs/models/operations/getcostreport.d.ts +2 -2
  41. package/dist/commonjs/models/operations/getcostsummary.d.ts +2 -2
  42. package/dist/commonjs/models/operations/getprofitability.d.ts +2 -2
  43. package/dist/commonjs/models/operations/getrevenue.d.ts +2 -2
  44. package/dist/commonjs/models/operations/ingestevent.d.ts +4 -4
  45. package/dist/commonjs/models/operations/listentitlements.d.ts +16 -0
  46. package/dist/commonjs/models/operations/listentitlements.d.ts.map +1 -1
  47. package/dist/commonjs/models/operations/listentitlements.js +11 -1
  48. package/dist/commonjs/models/operations/listentitlements.js.map +1 -1
  49. package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +4 -4
  50. package/dist/commonjs/models/revenuesummaryresponse.d.ts +2 -2
  51. package/dist/commonjs/sdk/invoicesv2.d.ts +2 -2
  52. package/dist/commonjs/sdk/invoicesv2.js +2 -2
  53. package/dist/commonjs/sdk/webhooks.d.ts +1 -1
  54. package/dist/commonjs/sdk/webhooks.js +1 -1
  55. package/dist/esm/funcs/billableMetricsCreate.js +2 -2
  56. package/dist/esm/funcs/billableMetricsCreate.js.map +1 -1
  57. package/dist/esm/funcs/billableMetricsListEvents.js +2 -2
  58. package/dist/esm/funcs/billableMetricsListEvents.js.map +1 -1
  59. package/dist/esm/funcs/billableMetricsMeter.js +2 -2
  60. package/dist/esm/funcs/billableMetricsMeter.js.map +1 -1
  61. package/dist/esm/funcs/costsCreateCost.js +2 -2
  62. package/dist/esm/funcs/costsCreateCost.js.map +1 -1
  63. package/dist/esm/funcs/entitlementsList.js +2 -2
  64. package/dist/esm/funcs/entitlementsList.js.map +1 -1
  65. package/dist/esm/funcs/eventsIngest.js +2 -2
  66. package/dist/esm/funcs/eventsIngest.js.map +1 -1
  67. package/dist/esm/funcs/feesCreate.js +2 -2
  68. package/dist/esm/funcs/feesCreate.js.map +1 -1
  69. package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts +1 -1
  70. package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js +1 -1
  71. package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts +1 -1
  72. package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js +1 -1
  73. package/dist/esm/funcs/merchantIntegrationsUpsertMerchantIntegration.js +2 -2
  74. package/dist/esm/funcs/merchantIntegrationsUpsertMerchantIntegration.js.map +1 -1
  75. package/dist/esm/funcs/merchantsReset.js +2 -2
  76. package/dist/esm/funcs/merchantsReset.js.map +1 -1
  77. package/dist/esm/funcs/paymentsCreate.js +2 -2
  78. package/dist/esm/funcs/paymentsCreate.js.map +1 -1
  79. package/dist/esm/funcs/plansCreate.js +2 -2
  80. package/dist/esm/funcs/plansCreate.js.map +1 -1
  81. package/dist/esm/funcs/productsCreate.js +2 -2
  82. package/dist/esm/funcs/productsCreate.js.map +1 -1
  83. package/dist/esm/funcs/testClocksCreate.js +2 -2
  84. package/dist/esm/funcs/testClocksCreate.js.map +1 -1
  85. package/dist/esm/funcs/webhooksEnable.js +2 -2
  86. package/dist/esm/funcs/webhooksEnable.js.map +1 -1
  87. package/dist/esm/funcs/webhooksGetPortal.d.ts +1 -1
  88. package/dist/esm/funcs/webhooksGetPortal.js +1 -1
  89. package/dist/esm/lib/config.d.ts +2 -2
  90. package/dist/esm/lib/config.js +2 -2
  91. package/dist/esm/models/costreportresponse.d.ts +14 -2
  92. package/dist/esm/models/costreportresponse.d.ts.map +1 -1
  93. package/dist/esm/models/costreportresponse.js.map +1 -1
  94. package/dist/esm/models/operations/getcostreport.d.ts +2 -2
  95. package/dist/esm/models/operations/getcostsummary.d.ts +2 -2
  96. package/dist/esm/models/operations/getprofitability.d.ts +2 -2
  97. package/dist/esm/models/operations/getrevenue.d.ts +2 -2
  98. package/dist/esm/models/operations/ingestevent.d.ts +4 -4
  99. package/dist/esm/models/operations/listentitlements.d.ts +16 -0
  100. package/dist/esm/models/operations/listentitlements.d.ts.map +1 -1
  101. package/dist/esm/models/operations/listentitlements.js +9 -0
  102. package/dist/esm/models/operations/listentitlements.js.map +1 -1
  103. package/dist/esm/models/profitabilitysummaryresponse.d.ts +4 -4
  104. package/dist/esm/models/revenuesummaryresponse.d.ts +2 -2
  105. package/dist/esm/sdk/invoicesv2.d.ts +2 -2
  106. package/dist/esm/sdk/invoicesv2.js +2 -2
  107. package/dist/esm/sdk/webhooks.d.ts +1 -1
  108. package/dist/esm/sdk/webhooks.js +1 -1
  109. package/jsr.json +1 -1
  110. package/package.json +1 -1
  111. package/src/funcs/billableMetricsCreate.ts +2 -2
  112. package/src/funcs/billableMetricsListEvents.ts +2 -2
  113. package/src/funcs/billableMetricsMeter.ts +2 -2
  114. package/src/funcs/costsCreateCost.ts +2 -2
  115. package/src/funcs/entitlementsList.ts +2 -2
  116. package/src/funcs/eventsIngest.ts +2 -2
  117. package/src/funcs/feesCreate.ts +2 -2
  118. package/src/funcs/invoicesV2RecordInvoicePayment.ts +1 -1
  119. package/src/funcs/invoicesV2RetryInvoicePayment.ts +1 -1
  120. package/src/funcs/merchantIntegrationsUpsertMerchantIntegration.ts +2 -2
  121. package/src/funcs/merchantsReset.ts +2 -2
  122. package/src/funcs/paymentsCreate.ts +2 -2
  123. package/src/funcs/plansCreate.ts +2 -2
  124. package/src/funcs/productsCreate.ts +2 -2
  125. package/src/funcs/testClocksCreate.ts +2 -2
  126. package/src/funcs/webhooksEnable.ts +2 -2
  127. package/src/funcs/webhooksGetPortal.ts +1 -1
  128. package/src/lib/config.ts +2 -2
  129. package/src/models/costreportresponse.ts +14 -2
  130. package/src/models/operations/getcostreport.ts +2 -2
  131. package/src/models/operations/getcostsummary.ts +2 -2
  132. package/src/models/operations/getprofitability.ts +2 -2
  133. package/src/models/operations/getrevenue.ts +2 -2
  134. package/src/models/operations/ingestevent.ts +4 -4
  135. package/src/models/operations/listentitlements.ts +33 -0
  136. package/src/models/profitabilitysummaryresponse.ts +4 -4
  137. package/src/models/revenuesummaryresponse.ts +2 -2
  138. package/src/sdk/invoicesv2.ts +2 -2
  139. package/src/sdk/webhooks.ts +1 -1
@@ -23,8 +23,17 @@ export type CostReportResponseObject = ClosedEnum<
23
23
  typeof CostReportResponseObject
24
24
  >;
25
25
 
26
+ /**
27
+ * The read window, as requested: the report counts from <= t < to. Unlike `costRange`, `to` is not an instant the report covers, so a chart axis ends before it.
28
+ */
26
29
  export type Period = {
30
+ /**
31
+ * Start of the read window, included.
32
+ */
27
33
  from: Date;
34
+ /**
35
+ * End of the read window, excluded.
36
+ */
28
37
  to: Date;
29
38
  };
30
39
 
@@ -35,7 +44,7 @@ export type Pagination = {
35
44
  };
36
45
 
37
46
  /**
38
- * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
47
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it.
39
48
  */
40
49
  export type CostReportResponseCostRange = {
41
50
  /**
@@ -54,6 +63,9 @@ export type CostReportResponse = {
54
63
  * ISO 4217 currency code for all monetary values in this response.
55
64
  */
56
65
  currency: string;
66
+ /**
67
+ * The read window, as requested: the report counts from <= t < to. Unlike `costRange`, `to` is not an instant the report covers, so a chart axis ends before it.
68
+ */
57
69
  period: Period;
58
70
  /**
59
71
  * The active grouping dimension (e.g. 'cost', 'customer', or a dynamic dimension key).
@@ -93,7 +105,7 @@ export type CostReportResponse = {
93
105
  */
94
106
  emptyGroupCount?: number | null | undefined;
95
107
  /**
96
- * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
108
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it.
97
109
  */
98
110
  costRange?: CostReportResponseCostRange | null | undefined;
99
111
  };
@@ -50,11 +50,11 @@ export type GetCostReportRequest = {
50
50
  */
51
51
  merchantId?: string | undefined;
52
52
  /**
53
- * Start of the query window (ISO 8601).
53
+ * Start of the query window, included (ISO 8601).
54
54
  */
55
55
  from: Date;
56
56
  /**
57
- * End of the query window (ISO 8601).
57
+ * End of the query window, excluded: the read counts from <= t < to (ISO 8601).
58
58
  */
59
59
  to: Date;
60
60
  /**
@@ -28,11 +28,11 @@ export type GetCostSummaryRequest = {
28
28
  */
29
29
  subject?: string | undefined;
30
30
  /**
31
- * Start of the query window (ISO 8601). Required together with 'to'.
31
+ * Start of the query window, included (ISO 8601). Required together with 'to'.
32
32
  */
33
33
  from: Date;
34
34
  /**
35
- * End of the query window (ISO 8601). Required together with 'from'.
35
+ * End of the query window, excluded: the read counts from <= t < to (ISO 8601). Required together with 'from'.
36
36
  */
37
37
  to: Date;
38
38
  /**
@@ -10,11 +10,11 @@ export type GetProfitabilityRequest = {
10
10
  */
11
11
  merchantId: string;
12
12
  /**
13
- * Start of the time range (ISO 8601 format)
13
+ * Start of the read window, included (ISO 8601 format)
14
14
  */
15
15
  from: Date;
16
16
  /**
17
- * End of the time range (ISO 8601 format)
17
+ * End of the read window, excluded: the read counts from <= t < to, so a month ends at the first instant of the next month (ISO 8601 format)
18
18
  */
19
19
  to: Date;
20
20
  /**
@@ -45,11 +45,11 @@ export type PeriodBasis = ClosedEnum<typeof PeriodBasis>;
45
45
 
46
46
  export type GetRevenueRequest = {
47
47
  /**
48
- * Start of the time range (ISO 8601 format)
48
+ * Start of the read window, included (ISO 8601 format)
49
49
  */
50
50
  startTime: Date;
51
51
  /**
52
- * End of the time range (ISO 8601 format)
52
+ * End of the read window, excluded: the read counts startTime <= t < endTime, so a month ends at the first instant of the next month (ISO 8601 format)
53
53
  */
54
54
  endTime: Date;
55
55
  /**
@@ -6,7 +6,7 @@ import * as z from "zod/v3";
6
6
 
7
7
  export type IngestEventRequestBody2 = {
8
8
  /**
9
- * CloudEvents type. Must match an eventType configured on a BillableMetric.
9
+ * CloudEvents type. Must match an eventType configured on a BillableMetric. Must not contain control characters.
10
10
  */
11
11
  type: string;
12
12
  /**
@@ -18,7 +18,7 @@ export type IngestEventRequestBody2 = {
18
18
  */
19
19
  subject?: string | undefined;
20
20
  /**
21
- * Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, events may resolve to the previous customer for up to one hour. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.
21
+ * Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, or its customer is deleted, events may resolve to the previous customer for up to one hour, and for up to 48 hours if Paygentic's database is unavailable. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.
22
22
  */
23
23
  externalSubject: string;
24
24
  /**
@@ -45,7 +45,7 @@ export type IngestEventRequestBody2 = {
45
45
 
46
46
  export type IngestEventRequestBody1 = {
47
47
  /**
48
- * CloudEvents type. Must match an eventType configured on a BillableMetric.
48
+ * CloudEvents type. Must match an eventType configured on a BillableMetric. Must not contain control characters.
49
49
  */
50
50
  type: string;
51
51
  /**
@@ -57,7 +57,7 @@ export type IngestEventRequestBody1 = {
57
57
  */
58
58
  subject: string;
59
59
  /**
60
- * Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, events may resolve to the previous customer for up to one hour. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.
60
+ * Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, or its customer is deleted, events may resolve to the previous customer for up to one hour, and for up to 48 hours if Paygentic's database is unavailable. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.
61
61
  */
62
62
  externalSubject?: string | undefined;
63
63
  /**
@@ -53,6 +53,16 @@ export const ListEntitlementsObject = {
53
53
  } as const;
54
54
  export type ListEntitlementsObject = ClosedEnum<typeof ListEntitlementsObject>;
55
55
 
56
+ /**
57
+ * Present only when the database can't be reached, or the list takes more than a second to compute. The response is then the last result for this same request in the past hour, computed at `computedAt`.
58
+ */
59
+ export type Stale = {
60
+ /**
61
+ * When this result was computed.
62
+ */
63
+ computedAt: Date;
64
+ };
65
+
56
66
  /**
57
67
  * Successfully retrieved the list of entitlements for the customer.
58
68
  */
@@ -66,6 +76,10 @@ export type ListEntitlementsResponse = {
66
76
  * Offset-based pagination response.
67
77
  */
68
78
  pagination: models.OffsetPagination;
79
+ /**
80
+ * Present only when the database can't be reached, or the list takes more than a second to compute. The response is then the last result for this same request in the past hour, computed at `computedAt`.
81
+ */
82
+ stale?: Stale | undefined;
69
83
  };
70
84
 
71
85
  /** @internal */
@@ -111,6 +125,24 @@ export const ListEntitlementsObject$inboundSchema: z.ZodNativeEnum<
111
125
  typeof ListEntitlementsObject
112
126
  > = z.nativeEnum(ListEntitlementsObject);
113
127
 
128
+ /** @internal */
129
+ export const Stale$inboundSchema: z.ZodType<Stale, z.ZodTypeDef, unknown> = z
130
+ .object({
131
+ computedAt: z.string().datetime({ offset: true }).transform(v =>
132
+ new Date(v)
133
+ ),
134
+ });
135
+
136
+ export function staleFromJSON(
137
+ jsonString: string,
138
+ ): SafeParseResult<Stale, SDKValidationError> {
139
+ return safeParse(
140
+ jsonString,
141
+ (x) => Stale$inboundSchema.parse(JSON.parse(x)),
142
+ `Failed to parse 'Stale' from JSON`,
143
+ );
144
+ }
145
+
114
146
  /** @internal */
115
147
  export const ListEntitlementsResponse$inboundSchema: z.ZodType<
116
148
  ListEntitlementsResponse,
@@ -120,6 +152,7 @@ export const ListEntitlementsResponse$inboundSchema: z.ZodType<
120
152
  object: ListEntitlementsObject$inboundSchema.default("list"),
121
153
  data: z.array(models.EntitlementListItem$inboundSchema),
122
154
  pagination: models.OffsetPagination$inboundSchema,
155
+ stale: z.lazy(() => Stale$inboundSchema).optional(),
123
156
  });
124
157
 
125
158
  export function listEntitlementsResponseFromJSON(
@@ -12,7 +12,7 @@ import {
12
12
  } from "./profitabilityrow.js";
13
13
 
14
14
  /**
15
- * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
15
+ * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
16
16
  */
17
17
  export type ProfitabilitySummaryResponseRevenueRange = {
18
18
  /**
@@ -26,7 +26,7 @@ export type ProfitabilitySummaryResponseRevenueRange = {
26
26
  };
27
27
 
28
28
  /**
29
- * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
29
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it.
30
30
  */
31
31
  export type ProfitabilitySummaryResponseCostRange = {
32
32
  /**
@@ -73,11 +73,11 @@ export type ProfitabilitySummaryResponse = {
73
73
  */
74
74
  warnings?: Array<string> | undefined;
75
75
  /**
76
- * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
76
+ * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
77
77
  */
78
78
  revenueRange?: ProfitabilitySummaryResponseRevenueRange | null | undefined;
79
79
  /**
80
- * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence.
80
+ * Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it.
81
81
  */
82
82
  costRange?: ProfitabilitySummaryResponseCostRange | null | undefined;
83
83
  };
@@ -28,7 +28,7 @@ import {
28
28
  } from "./revenuetrendbucket.js";
29
29
 
30
30
  /**
31
- * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
31
+ * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
32
32
  */
33
33
  export type RevenueSummaryResponseRevenueRange = {
34
34
  /**
@@ -85,7 +85,7 @@ export type RevenueSummaryResponse = {
85
85
  */
86
86
  currencyBreakdown?: Array<CurrencyBreakdownEntry> | undefined;
87
87
  /**
88
- * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
88
+ * Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
89
89
  */
90
90
  revenueRange?: RevenueSummaryResponseRevenueRange | null | undefined;
91
91
  };
@@ -148,7 +148,7 @@ export class InvoicesV2 extends ClientSDK {
148
148
  * - `hosted_link`: create a new hosted payment link and email it to the customer. The invoice stays unpaid until the customer pays on the link. Each call replaces the previous link. A payment link expires after 30 days; to collect an invoice whose link has expired, call this method again.
149
149
  * - `out_of_band`: record a payment that you collected outside Paygentic. The invoice changes to `PAID` immediately. A second call returns 409.
150
150
  *
151
- * For `hosted_link`, an invoice that does not exist returns 403, the same as an invoice of another merchant.
151
+ * For `hosted_link`, an invoice that does not exist returns 404, the same as an invoice of another merchant.
152
152
  *
153
153
  * Paygentic selects the payment provider from your connected payment account. The response reports the provider.
154
154
  *
@@ -239,7 +239,7 @@ export class InvoicesV2 extends ClientSDK {
239
239
  *
240
240
  * A 500 response has the standard error body, not `retry_payment_result`. It is an internal error, and a retry does not fix it.
241
241
  *
242
- * An invoice that does not exist returns 403, the same as an invoice of another merchant.
242
+ * An invoice that does not exist returns 404, the same as an invoice of another merchant.
243
243
  *
244
244
  * This operation is rate limited to one call each minute for each invoice.
245
245
  */
@@ -85,7 +85,7 @@ export class Webhooks extends ClientSDK {
85
85
  * Get Portal Access
86
86
  *
87
87
  * @remarks
88
- * Returns a link to the webhook portal, where you add endpoints, choose event types, read the signing secret and inspect deliveries. The link opens without a login and expires one hour after it is issued, at `expiresAt`. Treat it as a secret. Returns 404 unless webhooks are enabled.
88
+ * Returns a link to the webhook portal, where you add endpoints, choose event types, read the signing secret and inspect deliveries. The link opens without a login and expires one hour after it is issued, at `expiresAt`. Treat it as a secret. The link is read-only unless the caller holds `webhooks:write`: a read-only portal shows endpoints and deliveries but does not let you add or change endpoints, read the signing secret or replay messages. Returns 404 unless webhooks are enabled.
89
89
  */
90
90
  async getPortal(
91
91
  request?: operations.GetWebhookPortalRequest | undefined,