@fantastic.dev/better-stripe 0.90.0 → 0.91.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.
Files changed (216) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +41 -0
  4. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -0
  5. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +187 -0
  6. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -0
  7. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +2 -23
  8. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -1
  9. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +1 -112
  10. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -1
  11. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +8 -3
  12. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -1
  13. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +1 -0
  14. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -1
  15. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +1 -1
  16. package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts +8 -0
  17. package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts.map +1 -0
  18. package/dist/client/billing/renewalAttach/internal/configure/actor.js +454 -0
  19. package/dist/client/billing/renewalAttach/internal/configure/actor.js.map +1 -0
  20. package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts +12 -0
  21. package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts.map +1 -0
  22. package/dist/client/billing/renewalAttach/internal/configure/capture.js +99 -0
  23. package/dist/client/billing/renewalAttach/internal/configure/capture.js.map +1 -0
  24. package/dist/client/billing/renewalAttach/internal/configure/output.d.ts +16 -0
  25. package/dist/client/billing/renewalAttach/internal/configure/output.d.ts.map +1 -0
  26. package/dist/client/billing/renewalAttach/internal/configure/output.js +274 -0
  27. package/dist/client/billing/renewalAttach/internal/configure/output.js.map +1 -0
  28. package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts +3 -0
  29. package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts.map +1 -0
  30. package/dist/client/billing/renewalAttach/internal/configure/replay.js +9 -0
  31. package/dist/client/billing/renewalAttach/internal/configure/replay.js.map +1 -0
  32. package/dist/client/billing/renewalAttach/internal/configure/request.d.ts +39 -0
  33. package/dist/client/billing/renewalAttach/internal/configure/request.d.ts.map +1 -0
  34. package/dist/client/billing/renewalAttach/internal/configure/request.js +245 -0
  35. package/dist/client/billing/renewalAttach/internal/configure/request.js.map +1 -0
  36. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +88 -0
  37. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -0
  38. package/dist/client/billing/renewalAttach/internal/configure/transport.js +289 -0
  39. package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -0
  40. package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts +16 -0
  41. package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts.map +1 -0
  42. package/dist/client/billing/renewalAttach/internal/observation/actor.js +362 -0
  43. package/dist/client/billing/renewalAttach/internal/observation/actor.js.map +1 -0
  44. package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts +9 -0
  45. package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts.map +1 -0
  46. package/dist/client/billing/renewalAttach/internal/observation/capture.js +215 -0
  47. package/dist/client/billing/renewalAttach/internal/observation/capture.js.map +1 -0
  48. package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts +7 -0
  49. package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts.map +1 -0
  50. package/dist/client/billing/renewalAttach/internal/observation/profile.js +190 -0
  51. package/dist/client/billing/renewalAttach/internal/observation/profile.js.map +1 -0
  52. package/dist/client/billing/renewalAttach/internal/observation/record.d.ts +5 -0
  53. package/dist/client/billing/renewalAttach/internal/observation/record.d.ts.map +1 -0
  54. package/dist/client/billing/renewalAttach/internal/observation/record.js +317 -0
  55. package/dist/client/billing/renewalAttach/internal/observation/record.js.map +1 -0
  56. package/dist/client/billing/renewalAttach/internal/observation/types.d.ts +79 -0
  57. package/dist/client/billing/renewalAttach/internal/observation/types.d.ts.map +1 -0
  58. package/dist/client/billing/renewalAttach/internal/observation/types.js +27 -0
  59. package/dist/client/billing/renewalAttach/internal/observation/types.js.map +1 -0
  60. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts +18 -0
  61. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts.map +1 -0
  62. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js +229 -0
  63. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js.map +1 -0
  64. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +163 -0
  65. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -0
  66. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +443 -0
  67. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -0
  68. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
  69. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -0
  70. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +467 -0
  71. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -0
  72. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +6 -0
  73. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -0
  74. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +59 -0
  75. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -0
  76. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts +10 -0
  77. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts.map +1 -0
  78. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js +48 -0
  79. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js.map +1 -0
  80. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts +20 -0
  81. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts.map +1 -0
  82. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js +44 -0
  83. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js.map +1 -0
  84. package/dist/client/billing/renewalAttach/internal/operations/types.d.ts +42 -0
  85. package/dist/client/billing/renewalAttach/internal/operations/types.d.ts.map +1 -0
  86. package/dist/client/billing/renewalAttach/internal/operations/types.js +158 -0
  87. package/dist/client/billing/renewalAttach/internal/operations/types.js.map +1 -0
  88. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts +5 -0
  89. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts.map +1 -0
  90. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js +214 -0
  91. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js.map +1 -0
  92. package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts +33 -0
  93. package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts.map +1 -0
  94. package/dist/client/billing/renewalAttach/internal/preflight/grammar.js +208 -0
  95. package/dist/client/billing/renewalAttach/internal/preflight/grammar.js.map +1 -0
  96. package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts +4 -0
  97. package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts.map +1 -0
  98. package/dist/client/billing/renewalAttach/internal/preflight/output.js +25 -0
  99. package/dist/client/billing/renewalAttach/internal/preflight/output.js.map +1 -0
  100. package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts +16 -0
  101. package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts.map +1 -0
  102. package/dist/client/billing/renewalAttach/internal/preflight/record.js +93 -0
  103. package/dist/client/billing/renewalAttach/internal/preflight/record.js.map +1 -0
  104. package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts +7 -0
  105. package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts.map +1 -0
  106. package/dist/client/billing/renewalAttach/internal/preflight/relations.js +153 -0
  107. package/dist/client/billing/renewalAttach/internal/preflight/relations.js.map +1 -0
  108. package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts +22 -0
  109. package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts.map +1 -0
  110. package/dist/client/billing/renewalAttach/internal/recovery/material.js +221 -0
  111. package/dist/client/billing/renewalAttach/internal/recovery/material.js.map +1 -0
  112. package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +8 -0
  113. package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -0
  114. package/dist/client/billing/renewalAttach/internal/recovery/output.js +101 -0
  115. package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -0
  116. package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +12 -0
  117. package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -0
  118. package/dist/client/billing/renewalAttach/internal/recovery/record.js +186 -0
  119. package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -0
  120. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +5 -0
  121. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -0
  122. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +498 -0
  123. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -0
  124. package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +21 -0
  125. package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -0
  126. package/dist/client/billing/renewalAttach/internal/recovery/relation.js +119 -0
  127. package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -0
  128. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
  129. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +16 -16
  130. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  131. package/dist/component/balanceFunding/mutations.d.ts +16 -16
  132. package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
  133. package/dist/component/payoutRelease/queries.d.ts +2 -2
  134. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  135. package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
  136. package/dist/component/usage/allowance.fixtures.d.ts +16 -16
  137. package/docs/renewal-context-reads.md +26 -8
  138. package/docs/renewal-material-observation.md +37 -0
  139. package/docs/renewal-phase-assembly.md +68 -0
  140. package/docs/renewal-raw-acquisition.md +19 -5
  141. package/package.json +1 -1
  142. package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +304 -0
  143. package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +2 -160
  144. package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +15 -3
  145. package/src/client/billing/renewalAttach/internal/configure/actor.ts +575 -0
  146. package/src/client/billing/renewalAttach/internal/configure/capture.ts +117 -0
  147. package/src/client/billing/renewalAttach/internal/configure/dispatch.integration.test.ts +32 -0
  148. package/src/client/billing/renewalAttach/internal/configure/limits.test.ts +510 -0
  149. package/src/client/billing/renewalAttach/internal/configure/order.integration.test.ts +207 -0
  150. package/src/client/billing/renewalAttach/internal/configure/output.ts +372 -0
  151. package/src/client/billing/renewalAttach/internal/configure/ownership.integration.test.ts +148 -0
  152. package/src/client/billing/renewalAttach/internal/configure/replay.integration.test.ts +173 -0
  153. package/src/client/billing/renewalAttach/internal/configure/replay.ts +13 -0
  154. package/src/client/billing/renewalAttach/internal/configure/request.ts +312 -0
  155. package/src/client/billing/renewalAttach/internal/configure/transport.integration.test.ts +507 -0
  156. package/src/client/billing/renewalAttach/internal/configure/transport.ts +348 -0
  157. package/src/client/billing/renewalAttach/internal/observation/actor.ts +444 -0
  158. package/src/client/billing/renewalAttach/internal/observation/capture.ts +250 -0
  159. package/src/client/billing/renewalAttach/internal/observation/observation.integration.test.ts +220 -0
  160. package/src/client/billing/renewalAttach/internal/observation/observationRetirement.integration.test.ts +60 -0
  161. package/src/client/billing/renewalAttach/internal/observation/profile.ts +264 -0
  162. package/src/client/billing/renewalAttach/internal/observation/record.ts +408 -0
  163. package/src/client/billing/renewalAttach/internal/observation/types.ts +102 -0
  164. package/src/client/billing/renewalAttach/internal/operations/configureReadTransport.ts +285 -0
  165. package/src/client/billing/renewalAttach/internal/operations/defaultBindings.test.ts +69 -0
  166. package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +574 -0
  167. package/src/client/billing/renewalAttach/internal/operations/initialAttach.integration.test.ts +34 -0
  168. package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +535 -0
  169. package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +63 -0
  170. package/src/client/billing/renewalAttach/internal/operations/providerFailure.integration.test.ts +61 -0
  171. package/src/client/billing/renewalAttach/internal/operations/providerFailure.ts +66 -0
  172. package/src/client/billing/renewalAttach/internal/operations/sourceOperations.ts +50 -0
  173. package/src/client/billing/renewalAttach/internal/operations/transport.integration.test.ts +116 -0
  174. package/src/client/billing/renewalAttach/internal/operations/types.ts +223 -0
  175. package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.integration.test.ts +285 -0
  176. package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.ts +258 -0
  177. package/src/client/billing/renewalAttach/internal/preflight/configureReads.integration.test.ts +139 -0
  178. package/src/client/billing/renewalAttach/internal/preflight/grammar.ts +257 -0
  179. package/src/client/billing/renewalAttach/internal/preflight/output.ts +42 -0
  180. package/src/client/billing/renewalAttach/internal/preflight/owner.integration.test.ts +82 -0
  181. package/src/client/billing/renewalAttach/internal/preflight/preflight.integration.test.ts +354 -0
  182. package/src/client/billing/renewalAttach/internal/preflight/record.ts +127 -0
  183. package/src/client/billing/renewalAttach/internal/preflight/relations.ts +209 -0
  184. package/src/client/billing/renewalAttach/internal/recovery/material.ts +311 -0
  185. package/src/client/billing/renewalAttach/internal/recovery/output.ts +136 -0
  186. package/src/client/billing/renewalAttach/internal/recovery/record.ts +230 -0
  187. package/src/client/billing/renewalAttach/internal/recovery/recovery.integration.test.ts +463 -0
  188. package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +599 -0
  189. package/src/client/billing/renewalAttach/internal/recovery/relation.ts +175 -0
  190. package/src/client/billing/renewalAttach/internal/test-fixtures/attachEntries.ts +217 -0
  191. package/src/client/billing/renewalAttach/internal/test-fixtures/attachObservations.ts +226 -0
  192. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenario.ts +556 -0
  193. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioAssertions.ts +180 -0
  194. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioBarriers.ts +144 -0
  195. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightAssertions.ts +122 -0
  196. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightBarriers.ts +330 -0
  197. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightControls.ts +139 -0
  198. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightOperation.ts +513 -0
  199. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadNativeBaseline.ts +344 -0
  200. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadOperation.ts +278 -0
  201. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadPort.ts +17 -0
  202. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteAssertions.ts +533 -0
  203. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteBarriers.ts +125 -0
  204. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDeclarations.ts +314 -0
  205. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteHistory.ts +463 -0
  206. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteObservations.ts +515 -0
  207. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteOperation.ts +600 -0
  208. package/src/client/billing/renewalAttach/internal/test-fixtures/observationAssertions.ts +211 -0
  209. package/src/client/billing/renewalAttach/internal/test-fixtures/observationDeclarations.ts +192 -0
  210. package/src/client/billing/renewalAttach/internal/test-fixtures/observationHTTP.ts +197 -0
  211. package/src/client/billing/renewalAttach/internal/test-fixtures/observationObservations.ts +269 -0
  212. package/src/client/billing/renewalAttach/internal/test-fixtures/observationOperation.ts +262 -0
  213. package/src/client/billing/renewalAttach/internal/test-fixtures/observationProbe.ts +319 -0
  214. package/src/client/billing/renewalAttach/internal/test-fixtures/ownedOperations.ts +94 -0
  215. package/src/client/billing/renewalAttach/internal/test-fixtures/sourceOperationPort.ts +16 -0
  216. package/src/client/billing/renewalAttach/internal/test-fixtures/stockHttp.ts +21 -0
@@ -0,0 +1,443 @@
1
+ import { types } from "node:util";
2
+ import { requiredJSONSnapshot } from "../material/requiredJson.js";
3
+ import { rejectProxyJSON } from "../acquisition/rawWireSource.js";
4
+ import { closed, captureRequestAndReads, need, stop, freezeJSON, } from "./types.js";
5
+ import { safeDiagnostics, opaqueRecord, } from "./providerFailure.js";
6
+ import { equal } from "../../../renewalAggregate/shared.js";
7
+ import { loadInitialOwnedTransportSource, loadRecoveryOwnedTransportSource, loadOwnedTransportSource, } from "./sourceOperations.js";
8
+ import { OWNER } from "../originalOwner.js";
9
+ function sourceFunction(service, name) {
10
+ need(service && typeof service === "object" && !types.isProxy(service));
11
+ const d = Object.getOwnPropertyDescriptor(service, name);
12
+ need(d && "value" in d && typeof d.value === "function");
13
+ // The function is selected once from validated own data, preserving its receiver.
14
+ return { receiver: service, method: d.value };
15
+ }
16
+ /** Internal fixed attach profile: 43 reads and one POST, never a 44-GET profile. */
17
+ function captureSource(raw) {
18
+ const b = closed(raw, ["owner", "request", "readPlan", "delegate"]);
19
+ need(b.owner === OWNER);
20
+ const owner = sourceFunction(b.owner, "check"), delegate = sourceFunction(b.delegate, "rawRequest");
21
+ const { request, plan } = captureRequestAndReads(b.request, b.readPlan);
22
+ return Object.freeze({
23
+ owner: owner.receiver,
24
+ check: owner.method,
25
+ delegate: delegate.receiver,
26
+ send: delegate.method,
27
+ request,
28
+ plan: Object.freeze(plan),
29
+ });
30
+ }
31
+ function validRead(row, method, path, body, options) {
32
+ need(row && method === row.method && path === row.path && body === undefined);
33
+ const value = closed(options, ["apiVersion", "maxNetworkRetries"]);
34
+ need(value.apiVersion === row.options.apiVersion &&
35
+ value.maxNetworkRetries === 0);
36
+ }
37
+ function checkOwnerResult(value) {
38
+ const x = closed(value, ["wallMs", "ns", "nowSeconds", "retired"]);
39
+ need(typeof x.wallMs === "number" &&
40
+ Number.isSafeInteger(x.wallMs) &&
41
+ x.wallMs >= 0 &&
42
+ typeof x.ns === "bigint" &&
43
+ x.ns >= 0n &&
44
+ x.ns <= 18446744073709551615n &&
45
+ typeof x.nowSeconds === "number" &&
46
+ Number.isSafeInteger(x.nowSeconds) &&
47
+ x.nowSeconds === Math.floor(x.wallMs / 1000) &&
48
+ x.retired === false);
49
+ }
50
+ const notStarted = (reason) => Object.freeze({ outcome: "not_started", reason });
51
+ const nativeResponsePrototype = Response.prototype, nativeStatusGetter = Object.getOwnPropertyDescriptor(nativeResponsePrototype, "status").get, apply = Reflect.apply;
52
+ function capturePostReply(reply) {
53
+ rejectProxyJSON(reply, true);
54
+ need(reply !== null && typeof reply === "object" && !Array.isArray(reply));
55
+ const proto = Object.getPrototypeOf(reply);
56
+ need(proto === Object.prototype || proto === null);
57
+ const meta = Object.getOwnPropertyDescriptor(reply, "lastResponse");
58
+ need(meta &&
59
+ !meta.enumerable &&
60
+ "value" in meta &&
61
+ meta.value !== null &&
62
+ typeof meta.value === "object");
63
+ const metadata = meta.value;
64
+ need(!types.isProxy(metadata));
65
+ const codes = [];
66
+ for (const key of ["status", "statusCode"]) {
67
+ const d = Object.getOwnPropertyDescriptor(metadata, key);
68
+ if (!d)
69
+ continue;
70
+ need("value" in d);
71
+ if (d.value !== undefined)
72
+ codes.push(d.value);
73
+ }
74
+ if (Object.getPrototypeOf(metadata) === nativeResponsePrototype)
75
+ codes.push(apply(nativeStatusGetter, metadata, []));
76
+ need(codes.length > 0 &&
77
+ codes.every((x) => typeof x === "number" &&
78
+ Number.isInteger(x) &&
79
+ x >= 200 &&
80
+ x < 300 &&
81
+ x === codes[0]));
82
+ const statusCode = codes[0];
83
+ need(typeof statusCode === "number");
84
+ const entries = [];
85
+ for (const key of Reflect.ownKeys(reply)) {
86
+ need(typeof key === "string");
87
+ if (key === "lastResponse")
88
+ continue;
89
+ const d = Object.getOwnPropertyDescriptor(reply, key);
90
+ need(d && d.enumerable && "value" in d);
91
+ entries.push([key, d.value]);
92
+ }
93
+ return Object.freeze({
94
+ body: requiredJSONSnapshot(Object.fromEntries(entries)),
95
+ statusCode,
96
+ });
97
+ }
98
+ function build(source, association) {
99
+ const b = captureSource(source), generation = Object.freeze({});
100
+ let ordinal = 0, index = 0, pending = null, failedRead = false, consumedPost = false;
101
+ let postState = "NOT_STARTED", postAttempt = null, rejectionSlot = null, lastFailedRead = null, closedOwner = false, checking = false;
102
+ function ownerGate() {
103
+ if (closedOwner || checking) {
104
+ closedOwner = true;
105
+ stop();
106
+ }
107
+ checking = true;
108
+ try {
109
+ checkOwnerResult(Reflect.apply(b.check, b.owner, []));
110
+ if (closedOwner)
111
+ stop();
112
+ }
113
+ catch {
114
+ closedOwner = true;
115
+ stop();
116
+ }
117
+ finally {
118
+ checking = false;
119
+ }
120
+ }
121
+ function attempt(kind, row) {
122
+ need(!pending && ordinal < 44);
123
+ const value = Object.freeze({
124
+ generation,
125
+ ordinal: ++ordinal,
126
+ kind,
127
+ resource: kind === "read" && "resource" in row ? row.resource : "post",
128
+ method: row.method,
129
+ path: row.path,
130
+ id: "id" in row ? row.id : b.request.payload.from_subscription,
131
+ });
132
+ pending = value;
133
+ return value;
134
+ }
135
+ const own = (a) => pending === a && a.generation === generation;
136
+ const postCatchRecords = new WeakMap();
137
+ let reservation = "unused", fulfilledSlot = null;
138
+ async function rawRequest(method, path, body, options) {
139
+ need(!failedRead && !consumedPost && !pending && index < b.plan.length);
140
+ ownerGate();
141
+ const row = b.plan[index];
142
+ validRead(row, method, path, body, options);
143
+ const a = attempt("read", row);
144
+ let reply;
145
+ try {
146
+ reply = await Reflect.apply(b.send, b.delegate, [
147
+ method,
148
+ path,
149
+ body,
150
+ row.options,
151
+ ]);
152
+ }
153
+ catch (error) {
154
+ need(own(a));
155
+ failedRead = true;
156
+ lastFailedRead = a;
157
+ let live = false;
158
+ try {
159
+ ownerGate();
160
+ live = true;
161
+ }
162
+ catch {
163
+ /* Retired errors are opaque. */
164
+ }
165
+ if (live && own(a))
166
+ rejectionSlot = {
167
+ attempt: a,
168
+ record: opaqueRecord({
169
+ phase: "read",
170
+ ordinal: a.ordinal,
171
+ diagnostics: safeDiagnostics(error),
172
+ }, "rawError", error),
173
+ };
174
+ pending = null;
175
+ if (live)
176
+ throw error;
177
+ stop();
178
+ }
179
+ try {
180
+ ownerGate();
181
+ need(own(a));
182
+ }
183
+ catch {
184
+ failedRead = true;
185
+ pending = null;
186
+ stop();
187
+ }
188
+ pending = null;
189
+ index++;
190
+ return reply;
191
+ }
192
+ async function postAttach(...args) {
193
+ if (args.length ||
194
+ consumedPost ||
195
+ pending ||
196
+ failedRead ||
197
+ index !== b.plan.length)
198
+ return notStarted("not_ready");
199
+ try {
200
+ ownerGate();
201
+ }
202
+ catch {
203
+ return notStarted("owner_closed");
204
+ }
205
+ consumedPost = true;
206
+ const request = b.request, a = attempt("post", request);
207
+ postAttempt = a;
208
+ postState = "PENDING";
209
+ let reply;
210
+ try {
211
+ reply = await Reflect.apply(b.send, b.delegate, [
212
+ request.method,
213
+ request.path,
214
+ request.payload,
215
+ {
216
+ apiVersion: request.apiVersion,
217
+ idempotencyKey: request.key,
218
+ maxNetworkRetries: 0,
219
+ },
220
+ ]);
221
+ }
222
+ catch (error) {
223
+ postState = "REJECTED";
224
+ let live = false;
225
+ try {
226
+ ownerGate();
227
+ live = true;
228
+ }
229
+ catch {
230
+ /* No late error reflection. */
231
+ }
232
+ const valid = own(a) && postAttempt === a, diagnostics = live && valid ? safeDiagnostics(error) : Object.freeze({});
233
+ const record = opaqueRecord({
234
+ outcome: "provider_rejected",
235
+ phase: "post",
236
+ ordinal: a.ordinal,
237
+ diagnostics,
238
+ }, "rawError", error);
239
+ if (valid)
240
+ postCatchRecords.set(record, Object.freeze({ attempt: a, diagnostics }));
241
+ pending = null;
242
+ return record;
243
+ }
244
+ if (own(a) && postAttempt === a && a.generation === generation) {
245
+ const q = Object.create(null);
246
+ Object.defineProperty(q, "raw", {
247
+ value: reply,
248
+ enumerable: false,
249
+ writable: false,
250
+ configurable: false,
251
+ });
252
+ Object.freeze(q);
253
+ fulfilledSlot = Object.freeze({ attempt: a, generation, quarantine: q });
254
+ }
255
+ postState = "FULFILLED_UNVERIFIED";
256
+ try {
257
+ ownerGate();
258
+ need(own(a) && postAttempt === a);
259
+ const admitted = capturePostReply(reply);
260
+ ownerGate();
261
+ pending = null;
262
+ postState = "FULFILLED_SAFE";
263
+ return Object.freeze({
264
+ outcome: "fulfilled_safe",
265
+ body: freezeJSON(admitted.body),
266
+ statusCode: admitted.statusCode,
267
+ });
268
+ }
269
+ catch {
270
+ pending = null;
271
+ return opaqueRecord({ outcome: "fulfilled_unverified" }, "rawResponse", reply);
272
+ }
273
+ }
274
+ const transport = Object.freeze({
275
+ readTransport: Object.freeze({ rawRequest }),
276
+ postAttach,
277
+ takeReadRejection(...args) {
278
+ need(args.length === 0);
279
+ const slot = rejectionSlot;
280
+ rejectionSlot = null;
281
+ if (!slot ||
282
+ slot.attempt !== lastFailedRead ||
283
+ slot.attempt.generation !== generation ||
284
+ slot.attempt.kind !== "read")
285
+ return null;
286
+ return slot.record;
287
+ },
288
+ postDisposition(...args) {
289
+ need(args.length === 0);
290
+ return postState;
291
+ },
292
+ });
293
+ const capability = Object.freeze({
294
+ assertSourceOperationBinding(operation, request, readPlan, delegate) {
295
+ ownerGate();
296
+ if (!association ||
297
+ association.operation !== operation ||
298
+ association.readPlan !== readPlan ||
299
+ association.delegate !== delegate)
300
+ return false;
301
+ const current = captureRequestAndReads(request, readPlan);
302
+ const matches = equal(current.request, b.request) &&
303
+ current.plan.length === b.plan.length &&
304
+ current.plan.every((row, index) => {
305
+ const captured = b.plan[index];
306
+ return (row.resource === captured.resource &&
307
+ row.ordinal === captured.ordinal &&
308
+ row.method === captured.method &&
309
+ row.path === captured.path &&
310
+ row.body === captured.body &&
311
+ row.id === captured.id &&
312
+ row.options.apiVersion === captured.options.apiVersion &&
313
+ row.options.maxNetworkRetries === captured.options.maxNetworkRetries);
314
+ });
315
+ ownerGate();
316
+ return matches;
317
+ },
318
+ takeFulfilledQuarantine(...args) {
319
+ if (args.length !== 0 ||
320
+ pending !== null ||
321
+ fulfilledSlot === null ||
322
+ fulfilledSlot.attempt !== postAttempt ||
323
+ fulfilledSlot.generation !== generation ||
324
+ postAttempt === null ||
325
+ postAttempt.generation !== generation ||
326
+ postAttempt.kind !== "post" ||
327
+ (postState !== "FULFILLED_SAFE" && postState !== "FULFILLED_UNVERIFIED"))
328
+ return null;
329
+ const q = fulfilledSlot.quarantine;
330
+ fulfilledSlot = null;
331
+ return q;
332
+ },
333
+ assertVirginAcquisition(...args) {
334
+ need(args.length === 0);
335
+ try {
336
+ ownerGate();
337
+ }
338
+ catch {
339
+ return false;
340
+ }
341
+ if (reservation !== "unused" ||
342
+ ordinal !== 0 ||
343
+ index !== 0 ||
344
+ pending ||
345
+ failedRead ||
346
+ lastFailedRead ||
347
+ rejectionSlot ||
348
+ consumedPost ||
349
+ postAttempt ||
350
+ postState !== "NOT_STARTED") {
351
+ reservation = "invalid";
352
+ return false;
353
+ }
354
+ reservation = "reserved";
355
+ return true;
356
+ },
357
+ consumeReadCatch(...args) {
358
+ need(args.length === 0);
359
+ try {
360
+ ownerGate();
361
+ }
362
+ catch {
363
+ return null;
364
+ }
365
+ const slot = rejectionSlot;
366
+ if (reservation !== "reserved" ||
367
+ !failedRead ||
368
+ pending ||
369
+ !slot ||
370
+ slot.attempt !== lastFailedRead ||
371
+ slot.attempt.generation !== generation ||
372
+ slot.attempt.kind !== "read" ||
373
+ slot.attempt.ordinal > 43)
374
+ return null;
375
+ rejectionSlot = null;
376
+ return Object.freeze({
377
+ phase: "read",
378
+ ordinal: slot.attempt.ordinal,
379
+ diagnostics: slot.record.diagnostics,
380
+ });
381
+ },
382
+ consumePostCatch(actualReply) {
383
+ need(arguments.length === 1);
384
+ try {
385
+ ownerGate();
386
+ }
387
+ catch {
388
+ return null;
389
+ }
390
+ const stored = actualReply !== null &&
391
+ (typeof actualReply === "object" || typeof actualReply === "function")
392
+ ? postCatchRecords.get(actualReply)
393
+ : undefined;
394
+ if (reservation !== "reserved" ||
395
+ !stored ||
396
+ stored.attempt !== postAttempt ||
397
+ stored.attempt.generation !== generation ||
398
+ stored.attempt.kind !== "post" ||
399
+ postState !== "REJECTED" ||
400
+ pending ||
401
+ stored.attempt.ordinal > 44)
402
+ return null;
403
+ postCatchRecords.delete(actualReply);
404
+ return Object.freeze({
405
+ phase: "post",
406
+ ordinal: stored.attempt.ordinal,
407
+ diagnostics: stored.diagnostics,
408
+ });
409
+ },
410
+ });
411
+ return Object.freeze({ transport, capability });
412
+ }
413
+ export function createOwnedTransportWithAttemptCapability() {
414
+ need(arguments.length === 0);
415
+ OWNER.check();
416
+ const source = loadOwnedTransportSource();
417
+ OWNER.check();
418
+ return build(source);
419
+ }
420
+ function createAssociatedPair(load) {
421
+ OWNER.check();
422
+ const raw = load();
423
+ OWNER.check();
424
+ const frame = closed(raw, [
425
+ "owner",
426
+ "operation",
427
+ "request",
428
+ "readPlan",
429
+ "delegate",
430
+ ]);
431
+ need(frame.owner === OWNER);
432
+ const { operation, readPlan, delegate } = frame;
433
+ return build({ owner: OWNER, request: frame.request, readPlan, delegate }, Object.freeze({ operation, readPlan, delegate }));
434
+ }
435
+ export function createInitialOwnedTransportWithAttemptCapability() {
436
+ need(arguments.length === 0);
437
+ return createAssociatedPair(loadInitialOwnedTransportSource);
438
+ }
439
+ export function createRecoveryOwnedTransportWithAttemptCapability() {
440
+ need(arguments.length === 0);
441
+ return createAssociatedPair(loadRecoveryOwnedTransportSource);
442
+ }
443
+ //# sourceMappingURL=fixedTransport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixedTransport.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/fixedTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EACL,MAAM,EACN,sBAAsB,EACtB,IAAI,EACJ,IAAI,EACJ,UAAU,GAIX,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,YAAY,GAEb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,SAAS,cAAc,CACrB,OAAgB,EAChB,IAAY;IAEZ,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC,CAAC,IAAI,OAAO,IAAI,CAAC,IAAI,OAA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,KAAK,CAAC,KAAK,EAAE,CAAC;IACd,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,EAAE;QACxB,OAAO;QACP,WAAW;QACX,SAAS;QACT,UAAU;QACV,UAAU;KACX,CAAC,CAAC;IACH,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IAC5B,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAChD,OAAO,KAAK,CACV,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAC5D,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CACjD,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,gDAAgD;IAC9D,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC7B,OAAO,oBAAoB,CAAC,+BAA+B,CAAC,CAAC;AAC/D,CAAC;AACD,MAAM,UAAU,iDAAiD;IAC/D,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC7B,OAAO,oBAAoB,CAAC,gCAAgC,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** Internal single-use actor. Empty class registry precedes every Source side effect. */
2
+ export declare function captureInitialAttach(): Readonly<{
3
+ invoke(): Promise<unknown>;
4
+ }>;
5
+ export declare function captureOwnedInitialAttachV2(): Readonly<{
6
+ invoke(): Promise<unknown>;
7
+ }>;
8
+ //# sourceMappingURL=initialAttach.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialAttach.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/initialAttach.ts"],"names":[],"mappings":"AAuEA,yFAAyF;AACzF,wBAAgB,oBAAoB;;GAGnC;AACD,wBAAgB,2BAA2B;;GA0c1C"}