@delopay/sdk 0.511.0 → 0.513.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.
@@ -6,6 +6,8 @@ var Routing = class {
6
6
  this.surchargeRules = new SurchargeRules(request);
7
7
  this.checkoutThemeRules = new CheckoutThemeRules(request);
8
8
  this.checkoutThemeConversion = new CheckoutThemeConversion(request);
9
+ this.checkoutExperiments = new CheckoutExperiments(request);
10
+ this.checkoutTargeting = new CheckoutTargeting(request);
9
11
  }
10
12
  /**
11
13
  * Create a new routing algorithm.
@@ -530,6 +532,11 @@ var CheckoutThemeRules = class {
530
532
  * that is where a program drafted against a variant you have not built yet
531
533
  * belongs.
532
534
  *
535
+ * Send the `revision` the last read answered (`"0:0"` when it answered
536
+ * `null`): the save is then refused with `IR_16` when the scope's rules
537
+ * changed since, instead of overwriting someone else's edit. Without it the
538
+ * save replaces whatever is stored.
539
+ *
533
540
  * @example A phone in Germany gets the compact look; everyone else the house style.
534
541
  * ```typescript
535
542
  * await delopay.routing.checkoutThemeRules.upsert({
@@ -570,7 +577,9 @@ var CheckoutThemeRules = class {
570
577
  return this.request("PUT", "/routing/checkout-theme/rules", { body: params });
571
578
  }
572
579
  /**
573
- * Retrieve the active theme program for a scope, or `null` when none is set.
580
+ * Retrieve the theme program of a scope: the one in force, else the newest
581
+ * one (switched off or saved as a draft, `is_active: false`), or `null` when
582
+ * the scope never had one. Its `revision` goes back on the next save.
574
583
  *
575
584
  * `GET /routing/checkout-theme/rules?profile_id={profileId}`
576
585
  *
@@ -583,19 +592,24 @@ var CheckoutThemeRules = class {
583
592
  });
584
593
  }
585
594
  /**
586
- * Deactivate the active theme program for a scope. Idempotent.
595
+ * Deactivate the active theme program for a scope. Idempotent without
596
+ * `revision`. The program stays readable, switched off. Answers the scope's
597
+ * new `revision`, to send with the next save or switch-off.
587
598
  *
588
- * `DELETE /routing/checkout-theme/rules?profile_id={profileId}`
599
+ * `DELETE /routing/checkout-theme/rules?profile_id={profileId}&revision={revision}`
589
600
  *
590
601
  * Deactivation, not deletion — the stored row is what says which look was
591
602
  * live when, and that history cannot be reconstructed after the fact. Shops
592
603
  * go back to their default appearance immediately.
593
604
  *
594
605
  * @param profileId - Shop scope. Omit for the merchant-wide program.
606
+ * @param revision - The `revision` the last read answered. Switching off is
607
+ * then refused with `IR_16` when the rules changed since. Omit it to switch
608
+ * off whatever is in force.
595
609
  */
596
- async delete(profileId) {
610
+ async delete(profileId, revision) {
597
611
  return this.request("DELETE", "/routing/checkout-theme/rules", {
598
- query: { profile_id: profileId }
612
+ query: { profile_id: profileId, revision }
599
613
  });
600
614
  }
601
615
  };
@@ -644,8 +658,298 @@ var CheckoutThemeConversion = class {
644
658
  });
645
659
  }
646
660
  };
661
+ var CheckoutExperiments = class {
662
+ constructor(request) {
663
+ this.request = request;
664
+ }
665
+ /**
666
+ * The tests of a shop or template, in their order, with what an arm may name.
667
+ *
668
+ * `GET /routing/checkout-theme/experiments`
669
+ *
670
+ * For a shop on a template, the template's tests come back in `inherited`:
671
+ * they run in the shop after the shop's own, and are changed on the template.
672
+ */
673
+ async list(params = {}) {
674
+ return this.request("GET", "/routing/checkout-theme/experiments", {
675
+ query: {
676
+ profile_id: params.profile_id ?? void 0,
677
+ include_archived: params.include_archived ?? void 0
678
+ }
679
+ });
680
+ }
681
+ /**
682
+ * Create a test as a draft. Nothing is shown to buyers until it is started.
683
+ *
684
+ * `POST /routing/checkout-theme/experiments`
685
+ *
686
+ * A definition that cannot be stored (fewer than two arms, shares that do not
687
+ * add up to 10 000, an unknown control arm) is refused with a 400 naming why;
688
+ * a scope that holds the most tests it may is refused with `IR_16`.
689
+ *
690
+ * @example Half the phones in Germany see the compact look, half what they see today.
691
+ * ```typescript
692
+ * const { experiment } = await delopay.routing.checkoutExperiments.create({
693
+ * profile_id: 'pro_...',
694
+ * name: 'Compact on German phones',
695
+ * audience: { devices: ['phone'], countries: { countries: ['DE'] } },
696
+ * arms: [
697
+ * { key: 'current', look: null, share_bp: 5000 },
698
+ * { key: 'compact', look: 'compact', share_bp: 5000 },
699
+ * ],
700
+ * control_arm: 'current',
701
+ * });
702
+ * await delopay.routing.checkoutExperiments.start(experiment.id, {
703
+ * revision: experiment.revision,
704
+ * });
705
+ * ```
706
+ */
707
+ async create(params) {
708
+ return this.request("POST", "/routing/checkout-theme/experiments", { body: params });
709
+ }
710
+ /**
711
+ * Retrieve one test.
712
+ *
713
+ * `GET /routing/checkout-theme/experiments/{experiment_id}`
714
+ */
715
+ async retrieve(experimentId) {
716
+ return this.request(
717
+ "GET",
718
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}`
719
+ );
720
+ }
721
+ /**
722
+ * Change a test. Fields left out stay as they are.
723
+ *
724
+ * `PATCH /routing/checkout-theme/experiments/{experiment_id}`
725
+ *
726
+ * Once a test has started, a change to the audience, the arms, the control or
727
+ * the unit begins a new version and needs `new_version: true`; the results of
728
+ * each version stay apart. Use {@link CheckoutExperiments.preview} first to
729
+ * see what the change would do.
730
+ */
731
+ async update(experimentId, params) {
732
+ return this.request(
733
+ "PATCH",
734
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}`,
735
+ { body: params }
736
+ );
737
+ }
738
+ /**
739
+ * Delete a draft that never started. Anything else is refused with `IR_16`:
740
+ * archive it instead.
741
+ *
742
+ * `DELETE /routing/checkout-theme/experiments/{experiment_id}?revision={revision}`
743
+ *
744
+ * @param revision - The `revision` the test was read at.
745
+ */
746
+ async delete(experimentId, revision) {
747
+ return this.request(
748
+ "DELETE",
749
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}`,
750
+ { query: { revision } }
751
+ );
752
+ }
753
+ /**
754
+ * Set the order of a scope's tests: the first whose audience takes a buyer
755
+ * decides. Names every test of the scope that is not archived.
756
+ *
757
+ * `POST /routing/checkout-theme/experiments/reorder`
758
+ *
759
+ * Send the list's `order_token`: a reorder made on an order someone else
760
+ * changed since is then refused with `IR_16` instead of replacing theirs.
761
+ */
762
+ async reorder(params) {
763
+ return this.request("POST", "/routing/checkout-theme/experiments/reorder", { body: params });
764
+ }
765
+ /**
766
+ * What a create or a change would do, without saving it: why it would be
767
+ * refused, the warnings the test would carry and, for a started test,
768
+ * whether it begins a new version and how many returning buyers it moves.
769
+ *
770
+ * `POST /routing/checkout-theme/experiments/preview`
771
+ */
772
+ async preview(params) {
773
+ return this.request("POST", "/routing/checkout-theme/experiments/preview", { body: params });
774
+ }
775
+ /**
776
+ * Start a draft. It draws buyers from its `starts_at`, or at once without one.
777
+ *
778
+ * `POST /routing/checkout-theme/experiments/{experiment_id}/start`
779
+ */
780
+ async start(experimentId, params) {
781
+ return this.request(
782
+ "POST",
783
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/start`,
784
+ { body: params }
785
+ );
786
+ }
787
+ /**
788
+ * Pause a started test: its audience sees what it would without the test.
789
+ *
790
+ * `POST /routing/checkout-theme/experiments/{experiment_id}/pause`
791
+ */
792
+ async pause(experimentId, params) {
793
+ return this.request(
794
+ "POST",
795
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/pause`,
796
+ { body: params }
797
+ );
798
+ }
799
+ /**
800
+ * Resume a paused test. Returning buyers keep the look drawn for them.
801
+ *
802
+ * `POST /routing/checkout-theme/experiments/{experiment_id}/resume`
803
+ */
804
+ async resume(experimentId, params) {
805
+ return this.request(
806
+ "POST",
807
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/resume`,
808
+ { body: params }
809
+ );
810
+ }
811
+ /**
812
+ * End a test. With `keep_arm`, its audience keeps seeing that arm's look;
813
+ * without it, what it would see without the test.
814
+ *
815
+ * `POST /routing/checkout-theme/experiments/{experiment_id}/end`
816
+ */
817
+ async end(experimentId, params) {
818
+ return this.request(
819
+ "POST",
820
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/end`,
821
+ { body: params }
822
+ );
823
+ }
824
+ /**
825
+ * Start an ended test again, as a new version, optionally changing what it
826
+ * compares in the same step.
827
+ *
828
+ * `POST /routing/checkout-theme/experiments/{experiment_id}/restart`
829
+ */
830
+ async restart(experimentId, params) {
831
+ return this.request(
832
+ "POST",
833
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/restart`,
834
+ { body: params }
835
+ );
836
+ }
837
+ /**
838
+ * Put a draft or an ended test away. Its results stay readable. A test that
839
+ * is scheduled, running or paused is refused with `IR_16`: end it first.
840
+ *
841
+ * `POST /routing/checkout-theme/experiments/{experiment_id}/archive`
842
+ */
843
+ async archive(experimentId, params) {
844
+ return this.request(
845
+ "POST",
846
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/archive`,
847
+ { body: params }
848
+ );
849
+ }
850
+ /**
851
+ * A test's history: who created, changed, started, paused, ended or moved it.
852
+ *
853
+ * `GET /routing/checkout-theme/experiments/{experiment_id}/events`
854
+ */
855
+ async events(experimentId) {
856
+ return this.request(
857
+ "GET",
858
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/events`
859
+ );
860
+ }
861
+ /**
862
+ * A test's results for one version and one environment.
863
+ *
864
+ * `GET /routing/checkout-theme/experiments/{experiment_id}/results`
865
+ *
866
+ * Rates, intervals, verdicts and the sample-ratio check are computed
867
+ * server-side and shipped as values: show them as they are rather than
868
+ * recomputing them. A 404 means no such test or version, or a test that has
869
+ * not started.
870
+ *
871
+ * @example
872
+ * ```typescript
873
+ * const results = await delopay.routing.checkoutExperiments.results('cexp_...', {
874
+ * segment: 'device',
875
+ * });
876
+ * for (const c of results.comparisons) {
877
+ * if (c.verdict === 'better') console.log(`${c.arm} converts better than ${c.control_arm}`);
878
+ * }
879
+ * ```
880
+ */
881
+ async results(experimentId, params = {}) {
882
+ return this.request(
883
+ "GET",
884
+ `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/results`,
885
+ {
886
+ query: {
887
+ version: params.version ?? void 0,
888
+ test_mode: params.test_mode,
889
+ segment: params.segment ?? void 0
890
+ }
891
+ }
892
+ );
893
+ }
894
+ /**
895
+ * Every started, not archived test of a shop or template, in brief: the
896
+ * version in force, its counts, and the arm clearly ahead, if any.
897
+ *
898
+ * `GET /routing/checkout-theme/experiments/results-summary`
899
+ */
900
+ async resultsSummary(params = {}) {
901
+ return this.request("GET", "/routing/checkout-theme/experiments/results-summary", {
902
+ query: {
903
+ profile_id: params.profile_id ?? void 0,
904
+ test_mode: params.test_mode
905
+ }
906
+ });
907
+ }
908
+ };
909
+ var CheckoutTargeting = class {
910
+ constructor(request) {
911
+ this.request = request;
912
+ }
913
+ /**
914
+ * What a described buyer would see in a shop or template, and why: the look
915
+ * the link names, the tests in their order, the look rules, the look for the
916
+ * kind of payment, the default. Reads what is stored now and writes nothing;
917
+ * a test answers with its arms rather than drawing one.
918
+ *
919
+ * `POST /routing/checkout-theme/simulate`
920
+ *
921
+ * Pass `program` to try look rules before saving them: they stand in for the
922
+ * stored rules of their scope for this dry run only.
923
+ *
924
+ * @example
925
+ * ```typescript
926
+ * const outcome = await delopay.routing.checkoutTargeting.simulate({
927
+ * profile_id: 'pro_...',
928
+ * device: 'phone',
929
+ * country: 'DE',
930
+ * });
931
+ * console.log(outcome.source, outcome.look ?? 'default look');
932
+ * ```
933
+ */
934
+ async simulate(params) {
935
+ return this.request("POST", "/routing/checkout-theme/simulate", { body: params });
936
+ }
937
+ /**
938
+ * Whether looks are chosen at render, whether renders are measured, whether
939
+ * buyer signals and browser identity are available, and the test limits.
940
+ *
941
+ * `GET /routing/checkout-theme/capabilities?profile_id={profileId}`
942
+ *
943
+ * @param profileId - The shop or template. A shop-scoped caller may omit it.
944
+ */
945
+ async capabilities(profileId) {
946
+ return this.request("GET", "/routing/checkout-theme/capabilities", {
947
+ query: { profile_id: profileId }
948
+ });
949
+ }
950
+ };
647
951
 
648
952
  export {
649
953
  Routing
650
954
  };
651
- //# sourceMappingURL=chunk-HGTNJXXY.js.map
955
+ //# sourceMappingURL=chunk-ZER47MOF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/routing.ts"],"sourcesContent":["import type {\n ExperimentChangeResponse,\n ExperimentCreateRequest,\n ExperimentEndRequest,\n ExperimentEventsResponse,\n ExperimentListResponse,\n ExperimentPreviewRequest,\n ExperimentPreviewResponse,\n ExperimentReorderRequest,\n ExperimentResponse,\n ExperimentRestartRequest,\n ExperimentResultsQuery,\n ExperimentResultsResponse,\n ExperimentResultsSummaryQuery,\n ExperimentResultsSummaryResponse,\n ExperimentScopeQuery,\n ExperimentTransitionRequest,\n ExperimentUpdateRequest,\n TargetingCapabilitiesResponse,\n ThemeProgramDeactivateResponse,\n TargetingSimulateRequest,\n TargetingSimulateResponse,\n CheckoutThemeConversionQuery,\n CheckoutThemeConversionResponse,\n CheckoutThemeProgramRequest,\n CheckoutThemeProgramResponse,\n DefaultRoutingConfigUpdate,\n LinkedRoutingConfigRetrieveResponse,\n MerchantRoutingAlgorithm,\n ProfileDefaultRoutingConfig,\n ProfileDeniedConnectorsResponse,\n ProgramConnectorSelection,\n RoutableConnectorChoice,\n RoutingActivatePayload,\n RoutingConfigCreateRequest,\n RoutingConfigDeleteResponse,\n RoutingConfigHistoryResponse,\n RoutingConfigUpdateRequest,\n ConnectorCapOverride,\n ConnectorCapOverrideLevel,\n ConnectorCapOverrideList,\n ConnectorCapOverrideRequest,\n ConnectorCapOverrides,\n RoutingConnectorCapReset,\n RoutingConnectorCapResetRequest,\n RoutingConnectorCaps,\n RoutingConnectorCapSchedule,\n RoutingConnectorCapScheduleShuffle,\n RoutingDeactivateRequest,\n RoutingDictionary,\n RoutingDictionaryRecord,\n RoutingHistoryParams,\n RoutingProgramAnalysis,\n RoutingProgramAnalysisRequest,\n RoutingRuleKeys,\n RoutingTimePlanDocument,\n RoutingVolumeCounters,\n SurchargeRuleRequest,\n SurchargeRuleResponse,\n} from '../types';\nimport type { RequestExtras, RequestFn } from '../client';\n\n/**\n * Create and manage payment routing algorithms.\n *\n * Routing rules determine which gateway connector handles each payment based on\n * card type, currency, amount, or custom conditions.\n */\nexport class Routing {\n readonly decision: RoutingDecisionManager;\n /** Merchant-friendly, per-payment-method surcharge rules (no Euclid DSL). */\n readonly surchargeRules: SurchargeRules;\n /** Which stored appearance variant a buyer is shown. Decides a look, never a payment. */\n readonly checkoutThemeRules: CheckoutThemeRules;\n /** Rendered-to-paid conversion per appearance variant and segment. */\n readonly checkoutThemeConversion: CheckoutThemeConversion;\n /** Look tests: two or more looks shown to one audience at random, by shares, with results. */\n readonly checkoutExperiments: CheckoutExperiments;\n /** What a described buyer would see, and what this deployment can do for a scope. */\n readonly checkoutTargeting: CheckoutTargeting;\n\n constructor(private readonly request: RequestFn) {\n this.decision = new RoutingDecisionManager(request);\n this.surchargeRules = new SurchargeRules(request);\n this.checkoutThemeRules = new CheckoutThemeRules(request);\n this.checkoutThemeConversion = new CheckoutThemeConversion(request);\n this.checkoutExperiments = new CheckoutExperiments(request);\n this.checkoutTargeting = new CheckoutTargeting(request);\n }\n\n /**\n * Create a new routing algorithm.\n *\n * @param params - Routing algorithm definition (rule-based, priority, or volume-based).\n * @returns Metadata record for the created routing configuration. The full\n * algorithm body is not echoed back — use `retrieve(id)` if you need it.\n *\n * @example\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'EU Priority',\n * algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },\n * });\n * ```\n *\n * @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.\n * Rules run top-down (first match wins); `defaultSelection` is the fallback.\n * Splits must sum to 100; `amount` conditions are in minor units.\n * ```typescript\n * const config = await delopay.routing.create({\n * name: 'Card split 90/10',\n * profile_id: 'pro_...',\n * algorithm: {\n * type: 'advanced',\n * data: {\n * defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },\n * rules: [\n * {\n * name: 'cards',\n * connectorSelection: {\n * type: 'volume_split',\n * data: [\n * { connector: { connector: 'epayouts' }, split: 90 },\n * { connector: { connector: 'stripe' }, split: 10 },\n * ],\n * },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'payment_method',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'card' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * metadata: {},\n * },\n * },\n * });\n * await delopay.routing.activate(config.id);\n * ```\n */\n async create(params: RoutingConfigCreateRequest): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing', { body: params });\n }\n\n /**\n * Retrieve a routing algorithm by its ID.\n *\n * @param algorithmId - The routing algorithm ID.\n * @returns The full routing configuration including the algorithm body.\n */\n async retrieve(algorithmId: string): Promise<MerchantRoutingAlgorithm> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Activate a routing algorithm, making it the active routing strategy.\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param algorithmId - The routing algorithm ID to activate.\n * @param params - Optional activation payload (e.g. `transaction_type`).\n */\n async activate(\n algorithmId: string,\n params: RoutingActivatePayload = {},\n ): Promise<RoutingDictionaryRecord> {\n return this.request('POST', `/routing/${encodeURIComponent(algorithmId)}/activate`, {\n body: params,\n });\n }\n\n /**\n * Deactivate the currently active routing algorithm (falls back to default routing).\n *\n * Always sends a JSON body (default `{}`) so the request carries the\n * `Content-Type: application/json` header that the server requires.\n *\n * @param params - Optional deactivation payload.\n */\n async deactivate(params: RoutingDeactivateRequest = {}): Promise<RoutingDictionaryRecord> {\n return this.request('POST', '/routing/deactivate', { body: params });\n }\n\n /**\n * Edit a static routing configuration.\n *\n * Partial: send only the fields to change. `name`/`description` are\n * metadata-only; `algorithm` is a wholesale rule replacement, validated\n * against the shop exactly as at create. `modified_at` is bumped either way.\n *\n * `PUT /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm ID to edit.\n * @param params - The fields to change (at least one required).\n * @returns The updated routing configuration including the algorithm body.\n */\n async update(\n algorithmId: string,\n params: RoutingConfigUpdateRequest,\n options?: RequestExtras,\n ): Promise<MerchantRoutingAlgorithm> {\n return this.request('PUT', `/routing/${encodeURIComponent(algorithmId)}`, {\n body: params,\n ...options,\n });\n }\n\n /**\n * Delete a static routing configuration.\n *\n * A soft delete: the configuration disappears from every list and read, but\n * its version history is kept server-side for audit. The live configuration\n * of a shop cannot be deleted — the backend refuses it (400, `IR_16`); deactivate it first.\n * Only `single`, `priority`, `volume_split` and `advanced` payment\n * configurations qualify (400 otherwise).\n *\n * `DELETE /routing/{algorithmId}`\n *\n * @param algorithmId - The routing algorithm to delete.\n */\n async delete(algorithmId: string): Promise<RoutingConfigDeleteResponse> {\n return this.request('DELETE', `/routing/${encodeURIComponent(algorithmId)}`);\n }\n\n /**\n * Every content window a routing configuration has had, oldest first.\n *\n * A configuration's rule can be edited in place, so this is what makes \"which\n * rule decided this payment\" answerable after the fact. Each entry is the rule\n * as it stood between `valid_from` and `valid_until`; the windows of one\n * config abut exactly, with no gap.\n *\n * Paging covers the whole timeline including the live window, so a page never\n * holds more than `limit` entries and the live one — the only entry without a\n * `valid_until` — comes back on exactly one page. Advance `offset` by `limit`;\n * a page past the end is empty, and `total_count` says where that end is\n * without probing for it.\n *\n * `GET /routing/{algorithmId}/history`\n *\n * @param algorithmId - The routing algorithm to read the history of.\n * @param params - Optional paging.\n */\n async history(\n algorithmId: string,\n params: RoutingHistoryParams = {},\n ): Promise<RoutingConfigHistoryResponse> {\n return this.request('GET', `/routing/${encodeURIComponent(algorithmId)}/history`, {\n query: params as Record<string, number | null | undefined>,\n });\n }\n\n /**\n * A shop's per-connector caps, each with its unit and window and how much of\n * the current window is spent (`used`) or held by payments in flight\n * (`reserved`).\n *\n * `GET /routing/connector-caps/{profileId}`\n */\n async connectorCaps(profileId: string): Promise<RoutingConnectorCaps> {\n return this.request('GET', `/routing/connector-caps/${encodeURIComponent(profileId)}`);\n }\n\n /** Read a shop's dated limit overrides. `GET /routing/connector-cap-schedules/{profileId}` */\n async connectorCapSchedules(profileId: string): Promise<RoutingConnectorCapSchedule> {\n return this.request('GET', `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's complete schedule using its last-read revision.\n * Remove an entry to cancel it; ordinary configured caps are unchanged.\n * Instants require explicit offsets, and overlapping entries for the same\n * account and unit are refused by the server. Capability preflight refuses\n * unsupported backends before submitting any schedule.\n *\n * `PUT /routing/connector-cap-schedules/{profileId}`\n */\n async setConnectorCapSchedules(\n profileId: string,\n params: RoutingConnectorCapSchedule,\n ): Promise<RoutingConnectorCapSchedule> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'PUT',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`,\n {\n body: params,\n },\n );\n }\n\n /** Change the drawn value of an active scheduled range; preserves all usage. */\n async shuffleConnectorCapSchedule(\n profileId: string,\n params: RoutingConnectorCapScheduleShuffle,\n ): Promise<RoutingConnectorCaps> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('limit_schedules')) {\n throw new Error('Connector limit schedules are unsupported by the serving backend');\n }\n return this.request(\n 'POST',\n `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}/shuffle`,\n { body: params },\n );\n }\n\n /**\n * A shop's recurring time plan with its revision, the band active now, the\n * next change and each limit the plan releases in parts.\n *\n * `GET /routing/time-plans/{profileId}`\n */\n async timePlan(profileId: string): Promise<RoutingTimePlanDocument> {\n return this.request('GET', `/routing/time-plans/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's whole time plan using its last-read revision; `plan`\n * null removes it. Usage, reservations and dated limit entries are left as\n * they are. Overlapping bands, shares that do not total 100 and a stale\n * revision are refused by the server. Capability preflight refuses a\n * backend that would not apply the plan before anything is sent.\n *\n * `PUT /routing/time-plans/{profileId}`\n */\n async setTimePlan(\n profileId: string,\n params: Pick<RoutingTimePlanDocument, 'revision' | 'plan'>,\n ): Promise<RoutingTimePlanDocument> {\n const caps = await this.connectorCaps(profileId);\n if (!caps.features?.includes('time_plans')) {\n throw new Error('Time plans are unsupported by the serving backend');\n }\n return this.request('PUT', `/routing/time-plans/${encodeURIComponent(profileId)}`, {\n body: { revision: params.revision, plan: params.plan },\n });\n }\n\n /**\n * The live `routing_volume` counters behind a shop's active advanced\n * program: one per distinct budget the program reads, each with the window\n * it covers, the figure in the pinned threshold currency, and the rules that\n * read it. Lets a merchant see whether a `routing_volume < 50000` rule is at\n * 120 or at 499 today, and support answer why a payment went to the overflow\n * connector.\n *\n * What routing will use right now, not what the shop turned over: the\n * counters are held in Redis only and a lost Redis restarts the window at\n * zero. Read-only; needs the same permission as reading the rules.\n *\n * `GET /routing/volume-counters/{profileId}`\n */\n async volumeCounters(profileId: string): Promise<RoutingVolumeCounters> {\n return this.request('GET', `/routing/volume-counters/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Replace a shop's per-connector caps.\n *\n * Whole-set replacement, not a patch: the list sent becomes the complete set\n * of capped connectors, and an empty list clears them all — which is how\n * acquirer onboarding finishes, the new account ceasing to be a special case.\n * Re-send every other cap with its `unit`, `window` and `currency` as read:\n * an amount cap sent back without its `unit` is refused, because it carries a\n * currency and would otherwise be a payment count.\n *\n * Every account named must belong to this shop; one that does not is refused.\n * So is an amount cap without a `currency`, and a payment cap with one.\n *\n * An account may appear twice — a payment count and a budget — and never\n * twice in one `unit`. Re-send a range with its `limit_max`, or it is stored\n * as its bottom. Never re-send `current_limit` as `set_current_limit`: the\n * value read belongs to the window it was read in, and pinning it into a\n * window that has since reset is a limit nobody chose.\n *\n * `PUT /routing/connector-caps/{profileId}`\n */\n async setConnectorCaps(\n profileId: string,\n params: RoutingConnectorCaps,\n ): Promise<RoutingConnectorCaps> {\n return this.request('PUT', `/routing/connector-caps/${encodeURIComponent(profileId)}`, {\n body: params,\n });\n }\n\n /**\n * Reset one limit's usage for the window open now: what settled payments\n * spent stops counting, so the account takes payments again. Payments still\n * in flight keep their hold and count once they complete. The account's\n * other limit is untouched. Offered by a router that lists `usage_reset` in\n * `features`; refused (422) for an account with no limit in that unit.\n *\n * `POST /routing/connector-caps/{profileId}/reset`\n */\n async resetConnectorCapUsage(\n profileId: string,\n params: RoutingConnectorCapResetRequest,\n ): Promise<RoutingConnectorCapReset> {\n return this.request('POST', `/routing/connector-caps/${encodeURIComponent(profileId)}/reset`, {\n body: params,\n });\n }\n\n /**\n * Every connector cap override of the merchant: the accounts whose limits a\n * project or shop overrides.\n *\n * `GET /routing/connector-caps/overrides`\n */\n async connectorCapOverrides(): Promise<ConnectorCapOverrideList> {\n return this.request('GET', '/routing/connector-caps/overrides');\n }\n\n /**\n * One connector account's overrides, and for every shop the account takes\n * payments in, which limits apply there and where they come from.\n *\n * `GET /routing/connector-caps/accounts/{merchantConnectorId}/overrides`\n */\n async accountConnectorCapOverrides(merchantConnectorId: string): Promise<ConnectorCapOverrides> {\n return this.request(\n 'GET',\n `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides`,\n );\n }\n\n /**\n * Override an account's limits for one project (and every shop below it) or\n * one shop: `unlimited` lifts them there, `own` sets limits of its own,\n * counted separately from the account's. Replaces an existing override of\n * the same target. Setting the same target again keeps the usage its\n * current window already counted.\n *\n * `PUT /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async setConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n params: ConnectorCapOverrideRequest,\n ): Promise<ConnectorCapOverride> {\n return this.request('PUT', this.overridePath(merchantConnectorId, level, scopeId), {\n body: params,\n });\n }\n\n /**\n * Remove an account's override for one project or shop; the next level up\n * applies again. Answers the override removed.\n *\n * `DELETE /routing/connector-caps/accounts/{merchantConnectorId}/overrides/{level}/{scopeId}`\n */\n async deleteConnectorCapOverride(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): Promise<ConnectorCapOverride> {\n return this.request('DELETE', this.overridePath(merchantConnectorId, level, scopeId));\n }\n\n private overridePath(\n merchantConnectorId: string,\n level: ConnectorCapOverrideLevel,\n scopeId: string,\n ): string {\n return `/routing/connector-caps/accounts/${encodeURIComponent(merchantConnectorId)}/overrides/${encodeURIComponent(level)}/${encodeURIComponent(scopeId)}`;\n }\n\n /**\n * List all routing algorithms for the current merchant.\n *\n * @returns The routing dictionary (records + currently active id).\n */\n async list(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing');\n }\n\n /**\n * Connector names denied at routing for a shop (explicit denies plus\n * whitelist-implied exclusions). Read-only; surfaced in the routing builder.\n *\n * `GET /routing/connector-restrictions/{profileId}`\n */\n async connectorRestrictions(profileId: string): Promise<ProfileDeniedConnectorsResponse> {\n return this.request('GET', `/routing/connector-restrictions/${encodeURIComponent(profileId)}`);\n }\n\n // --- Advanced operations (Task 3.4) ---\n\n /** Get active routing config. `GET /routing/active` */\n async getActive(): Promise<LinkedRoutingConfigRetrieveResponse> {\n return this.request('GET', '/routing/active');\n }\n\n /** Update default routing config. `POST /routing/default` */\n async updateDefault(params: Record<string, unknown>): Promise<RoutableConnectorChoice[]> {\n return this.request('POST', '/routing/default', { body: params });\n }\n\n /** Retrieve default config for profiles. `GET /routing/default/profile` */\n async getDefaultProfile(): Promise<RoutableConnectorChoice[] | ProfileDefaultRoutingConfig[]> {\n return this.request('GET', '/routing/default/profile');\n }\n\n /**\n * Retrieve one profile's default config. `GET /routing/default/profile/{profileId}`\n *\n * The narrow counterpart of `getDefaultProfile()`: that one returns every\n * profile of the merchant and needs merchant-level routing read, so a\n * profile-scoped (shop) role could write its own default through\n * `updateDefaultProfile()` but never read it back. This read is gated on\n * profile-level routing read and pinned to the caller's own profile — a shop\n * role asking for a sibling profile is refused.\n */\n async getDefaultForProfile(profileId: string): Promise<ProfileDefaultRoutingConfig> {\n return this.request('GET', `/routing/default/profile/${encodeURIComponent(profileId)}`);\n }\n\n /**\n * Update default config for a profile. `POST /routing/default/profile/{profileId}`\n *\n * Send the list alone to keep the shop's fallback mode, or `{ connectors, mode, splits }` to set\n * it. A `volume_split` whose shares do not total 100 is refused.\n */\n async updateDefaultProfile(\n profileId: string,\n params: DefaultRoutingConfigUpdate | Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<ProfileDefaultRoutingConfig> {\n return this.request('POST', `/routing/default/profile/${encodeURIComponent(profileId)}`, {\n body: params,\n ...options,\n });\n }\n\n /** List routing configs for profile. `GET /routing/list/profile` */\n async listForProfile(): Promise<RoutingDictionary> {\n return this.request('GET', '/routing/list/profile');\n }\n\n /**\n * The keys the conditions of a routing rule, a 3DS decision rule and a\n * surcharge rule may read, with the values each takes. Dashboard session only.\n *\n * `GET /routing/rule/keys`\n */\n async ruleKeys(): Promise<RoutingRuleKeys> {\n return this.request('GET', '/routing/rule/keys');\n }\n\n /**\n * Check a draft advanced program for conditions that can never match or are\n * not valid. Stores nothing, and saving does not depend on it. The check stops\n * at the first problem and answers `analyzed: false` for a program that takes\n * too much work to check. It does not check the merchant's connector\n * accounts, so a result without an issue does not mean the save will accept\n * the connectors it names. Dashboard session only.\n *\n * `POST /routing/rule/analyze`\n */\n async analyzeProgram(program: ProgramConnectorSelection): Promise<RoutingProgramAnalysis> {\n const body: RoutingProgramAnalysisRequest = { program };\n return this.request('POST', '/routing/rule/analyze', { body });\n }\n\n /** Evaluate a routing rule. `POST /routing/rule/evaluate` */\n async evaluateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/evaluate', { body: params });\n }\n\n /** Migrate routing rules for profile. `POST /routing/rule/migrate` */\n async migrateRule(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/rule/migrate', { body: params });\n }\n\n /** Evaluate routing for a payment. `POST /routing/evaluate` */\n async evaluate(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/evaluate', { body: params });\n }\n\n /** Update gateway scores for dynamic routing. `POST /routing/feedback` */\n async feedback(params: Record<string, unknown>): Promise<Record<string, unknown>> {\n return this.request('POST', '/routing/feedback', { body: params });\n }\n}\n\nclass RoutingDecisionManager {\n constructor(private readonly request: RequestFn) {}\n\n /** Upsert decision manager config. `PUT /routing/decision` */\n async upsert(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision', { body: params, ...options });\n }\n\n /** Retrieve decision manager config. `GET /routing/decision` */\n async retrieve(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision');\n }\n\n /** Delete decision manager config. `DELETE /routing/decision` */\n async delete(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision', options);\n }\n\n /** Upsert surcharge decision config. `PUT /routing/decision/surcharge` */\n async upsertSurcharge(\n params: Record<string, unknown>,\n options?: RequestExtras,\n ): Promise<Record<string, unknown>> {\n return this.request('PUT', '/routing/decision/surcharge', { body: params, ...options });\n }\n\n /** Retrieve surcharge decision config. `GET /routing/decision/surcharge` */\n async retrieveSurcharge(): Promise<Record<string, unknown>> {\n return this.request('GET', '/routing/decision/surcharge');\n }\n\n /** Delete surcharge decision config. `DELETE /routing/decision/surcharge` */\n async deleteSurcharge(options?: RequestExtras): Promise<Record<string, unknown>> {\n return this.request('DELETE', '/routing/decision/surcharge', options);\n }\n}\n\n/**\n * Merchant-friendly surcharge rules: configure a per-payment-method surcharge\n * (fixed or %) added to the amount the buyer pays — without hand-writing the\n * Euclid DSL. Scope to a shop via `profile_id` (omit for merchant-wide).\n *\n * Distinct from the platform fee (a balance deduction): a surcharge changes what\n * the buyer is charged.\n */\nclass SurchargeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the surcharge program for a scope.\n *\n * `PUT /routing/surcharge/rules`\n *\n * @example\n * ```typescript\n * await delopay.routing.surchargeRules.upsert({\n * surcharges: [\n * { payment_method: 'crypto', surcharge: { rate: { percent: 1.0 } } },\n * { payment_method: 'card', surcharge: { fixed: { amount: 35 } } },\n * ],\n * });\n * ```\n */\n async upsert(\n params: SurchargeRuleRequest,\n options?: RequestExtras,\n ): Promise<SurchargeRuleResponse> {\n return this.request('PUT', '/routing/surcharge/rules', { body: params, ...options });\n }\n\n /**\n * Retrieve the active surcharge program for a scope, or `null` when none is set.\n *\n * `GET /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async retrieve(profileId?: string): Promise<SurchargeRuleResponse | null> {\n return this.request('GET', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active surcharge program for a scope.\n *\n * `DELETE /routing/surcharge/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide rule.\n */\n async delete(profileId?: string, options?: RequestExtras): Promise<void> {\n return this.request('DELETE', '/routing/surcharge/rules', {\n query: { profile_id: profileId },\n ...options,\n });\n }\n}\n\n/**\n * Checkout theme programs: which of a shop's stored appearance variants a buyer\n * is shown.\n *\n * Same engine and same wire format as the advanced routing rules above — a\n * Euclid program whose rules run top-down, first match wins, with\n * `defaultSelection` as the fallback — with the output swapped for a variant\n * name. That is deliberate: the dashboard's routing rule builder can author\n * these without learning a second condition language.\n *\n * **A theme program decides a look and nothing else.** It cannot express which\n * payment methods are offered, what is charged, which provider processes the\n * payment, or whether it succeeds. The allowed dimensions are fixed server-side\n * by the output type — see {@link CheckoutThemeDimension} — so that is a\n * property of the API rather than a convention.\n *\n * Naming a variant the shop has not defined is **not** an error: the checkout\n * falls back to the shop default, exactly as it does for an unknown `?theme=`,\n * because a buyer who cannot pay is worse than a buyer who sees the default\n * look. Such names come back in `warnings` instead, recomputed on every read.\n */\nclass CheckoutThemeRules {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Create or replace the theme program for a scope.\n *\n * `PUT /routing/checkout-theme/rules`\n *\n * Supersedes rather than overwrites: the previous active version is retired\n * and a new one stored, so the record of which look was live when survives.\n * Pass `active: false` to store a revision **without** retiring the live one —\n * that is where a program drafted against a variant you have not built yet\n * belongs.\n *\n * Send the `revision` the last read answered (`\"0:0\"` when it answered\n * `null`): the save is then refused with `IR_16` when the scope's rules\n * changed since, instead of overwriting someone else's edit. Without it the\n * save replaces whatever is stored.\n *\n * @example A phone in Germany gets the compact look; everyone else the house style.\n * ```typescript\n * await delopay.routing.checkoutThemeRules.upsert({\n * name: 'Autumn targeting',\n * profile_id: 'pro_...',\n * algorithm: {\n * rules: [\n * {\n * name: 'German phones',\n * connectorSelection: { theme: { variant: 'compact' } },\n * statements: [\n * {\n * condition: [\n * {\n * lhs: 'device_class',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'phone' },\n * metadata: {},\n * },\n * {\n * lhs: 'browser_language',\n * comparison: 'equal',\n * value: { type: 'enum_variant', value: 'de' },\n * metadata: {},\n * },\n * ],\n * },\n * ],\n * },\n * ],\n * defaultSelection: { theme: { variant: 'house' } },\n * metadata: {},\n * },\n * });\n * ```\n */\n async upsert(params: CheckoutThemeProgramRequest): Promise<CheckoutThemeProgramResponse> {\n return this.request('PUT', '/routing/checkout-theme/rules', { body: params });\n }\n\n /**\n * Retrieve the theme program of a scope: the one in force, else the newest\n * one (switched off or saved as a draft, `is_active: false`), or `null` when\n * the scope never had one. Its `revision` goes back on the next save.\n *\n * `GET /routing/checkout-theme/rules?profile_id={profileId}`\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program. A\n * shop-scoped caller that omits it gets its own shop's program.\n */\n async retrieve(profileId?: string): Promise<CheckoutThemeProgramResponse | null> {\n return this.request('GET', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId },\n });\n }\n\n /**\n * Deactivate the active theme program for a scope. Idempotent without\n * `revision`. The program stays readable, switched off. Answers the scope's\n * new `revision`, to send with the next save or switch-off.\n *\n * `DELETE /routing/checkout-theme/rules?profile_id={profileId}&revision={revision}`\n *\n * Deactivation, not deletion — the stored row is what says which look was\n * live when, and that history cannot be reconstructed after the fact. Shops\n * go back to their default appearance immediately.\n *\n * @param profileId - Shop scope. Omit for the merchant-wide program.\n * @param revision - The `revision` the last read answered. Switching off is\n * then refused with `IR_16` when the rules changed since. Omit it to switch\n * off whatever is in force.\n */\n async delete(profileId?: string, revision?: string): Promise<ThemeProgramDeactivateResponse> {\n return this.request('DELETE', '/routing/checkout-theme/rules', {\n query: { profile_id: profileId, revision },\n });\n }\n}\n\n/**\n * Rendered-to-paid conversion, per appearance variant and segment.\n *\n * Answers the one question theme targeting exists for: *does variant B convert\n * better than the house style, on phones, in Germany?*\n *\n * **What a rate here means.** The denominator is backend-observed checkout page\n * opens, deduplicated by device within the hosted checkout's cache window, with\n * automated traffic excluded from both sides. It is narrower than \"paints\", and\n * that is deliberate - counting one buyer's refresh as a second render would\n * understate conversion. The exact basis travels with every response in\n * `denominator`, and the ways it is not the whole truth travel in `caveats`.\n *\n * **The server decides what may be concluded, not you.** Rate, Wilson interval,\n * per-cell `verdict` and the variant-vs-default `separates` test are computed\n * once, server-side, and shipped as values. Do not recompute them: the first\n * client that rounds differently tells a merchant a difference is real when the\n * server says it is not.\n */\nclass CheckoutThemeConversion {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * Rendered-to-paid conversion for a shop over a window.\n *\n * `GET /routing/checkout-theme/conversion`\n *\n * Requires `CheckoutBranding` read at profile scope - the same permission\n * that governs seeing how a checkout looks.\n *\n * @param params - Window (RFC3339, `start` inclusive / `end` exclusive), the\n * shop, the dimension to group by, and the optional `device_class`,\n * `country` and `selection` filters.\n *\n * @example Which variant wins on which device, over the last 30 days.\n * ```typescript\n * const report = await delopay.routing.checkoutThemeConversion.retrieve({\n * profile_id: 'pro_...',\n * start: '2026-07-21T00:00:00Z',\n * end: '2026-08-20T00:00:00Z',\n * segment: 'device',\n * });\n *\n * for (const c of report.comparisons) {\n * if (!c.separates) continue; // \"not shown to differ\" - say nothing\n * console.log(`${c.variant} on ${c.segment}: ${c.higher} converts better`);\n * }\n * ```\n */\n async retrieve(params: CheckoutThemeConversionQuery): Promise<CheckoutThemeConversionResponse> {\n return this.request('GET', '/routing/checkout-theme/conversion', {\n query: {\n profile_id: params.profile_id,\n start: params.start,\n end: params.end,\n segment: params.segment,\n device_class: params.device_class ?? undefined,\n country: params.country ?? undefined,\n selection: params.selection ?? undefined,\n },\n });\n }\n}\n\n/**\n * Look tests: show the buyers of one audience one of two or more looks at\n * random, by shares you set, and read which converts better.\n *\n * A test belongs to a shop, or to a checkout template and then runs in every\n * shop on that template. Each buyer stays on the look first drawn for them:\n * per browser by default, or per payment. A buyer whose link names a look\n * (`?theme=`, a checkout entry's look) sees that look and is counted as drawn\n * but not shown. Within a scope, the first running test whose audience takes\n * a buyer decides; a shop's own tests come before its template's.\n *\n * Every change sends the `revision` the test was read at, and a test changed\n * since is refused with `IR_16`, so a stale page never overwrites a newer\n * edit. Each change answers with an {@link ExperimentChangeResponse}: the test\n * as it now stands, whether a new version began, and the share of returning\n * buyers whose look moved.\n *\n * Reads need checkout-branding read access; creating, editing, reordering and\n * deleting a draft need edit access; starting, pausing, resuming, ending,\n * restarting and archiving need write access.\n */\nclass CheckoutExperiments {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * The tests of a shop or template, in their order, with what an arm may name.\n *\n * `GET /routing/checkout-theme/experiments`\n *\n * For a shop on a template, the template's tests come back in `inherited`:\n * they run in the shop after the shop's own, and are changed on the template.\n */\n async list(params: ExperimentScopeQuery = {}): Promise<ExperimentListResponse> {\n return this.request('GET', '/routing/checkout-theme/experiments', {\n query: {\n profile_id: params.profile_id ?? undefined,\n include_archived: params.include_archived ?? undefined,\n },\n });\n }\n\n /**\n * Create a test as a draft. Nothing is shown to buyers until it is started.\n *\n * `POST /routing/checkout-theme/experiments`\n *\n * A definition that cannot be stored (fewer than two arms, shares that do not\n * add up to 10 000, an unknown control arm) is refused with a 400 naming why;\n * a scope that holds the most tests it may is refused with `IR_16`.\n *\n * @example Half the phones in Germany see the compact look, half what they see today.\n * ```typescript\n * const { experiment } = await delopay.routing.checkoutExperiments.create({\n * profile_id: 'pro_...',\n * name: 'Compact on German phones',\n * audience: { devices: ['phone'], countries: { countries: ['DE'] } },\n * arms: [\n * { key: 'current', look: null, share_bp: 5000 },\n * { key: 'compact', look: 'compact', share_bp: 5000 },\n * ],\n * control_arm: 'current',\n * });\n * await delopay.routing.checkoutExperiments.start(experiment.id, {\n * revision: experiment.revision,\n * });\n * ```\n */\n async create(params: ExperimentCreateRequest): Promise<ExperimentChangeResponse> {\n return this.request('POST', '/routing/checkout-theme/experiments', { body: params });\n }\n\n /**\n * Retrieve one test.\n *\n * `GET /routing/checkout-theme/experiments/{experiment_id}`\n */\n async retrieve(experimentId: string): Promise<ExperimentResponse> {\n return this.request(\n 'GET',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}`,\n );\n }\n\n /**\n * Change a test. Fields left out stay as they are.\n *\n * `PATCH /routing/checkout-theme/experiments/{experiment_id}`\n *\n * Once a test has started, a change to the audience, the arms, the control or\n * the unit begins a new version and needs `new_version: true`; the results of\n * each version stay apart. Use {@link CheckoutExperiments.preview} first to\n * see what the change would do.\n */\n async update(\n experimentId: string,\n params: ExperimentUpdateRequest,\n ): Promise<ExperimentChangeResponse> {\n return this.request(\n 'PATCH',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}`,\n { body: params },\n );\n }\n\n /**\n * Delete a draft that never started. Anything else is refused with `IR_16`:\n * archive it instead.\n *\n * `DELETE /routing/checkout-theme/experiments/{experiment_id}?revision={revision}`\n *\n * @param revision - The `revision` the test was read at.\n */\n async delete(experimentId: string, revision: number): Promise<void> {\n return this.request(\n 'DELETE',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}`,\n { query: { revision } },\n );\n }\n\n /**\n * Set the order of a scope's tests: the first whose audience takes a buyer\n * decides. Names every test of the scope that is not archived.\n *\n * `POST /routing/checkout-theme/experiments/reorder`\n *\n * Send the list's `order_token`: a reorder made on an order someone else\n * changed since is then refused with `IR_16` instead of replacing theirs.\n */\n async reorder(params: ExperimentReorderRequest): Promise<ExperimentListResponse> {\n return this.request('POST', '/routing/checkout-theme/experiments/reorder', { body: params });\n }\n\n /**\n * What a create or a change would do, without saving it: why it would be\n * refused, the warnings the test would carry and, for a started test,\n * whether it begins a new version and how many returning buyers it moves.\n *\n * `POST /routing/checkout-theme/experiments/preview`\n */\n async preview(params: ExperimentPreviewRequest): Promise<ExperimentPreviewResponse> {\n return this.request('POST', '/routing/checkout-theme/experiments/preview', { body: params });\n }\n\n /**\n * Start a draft. It draws buyers from its `starts_at`, or at once without one.\n *\n * `POST /routing/checkout-theme/experiments/{experiment_id}/start`\n */\n async start(\n experimentId: string,\n params: ExperimentTransitionRequest,\n ): Promise<ExperimentChangeResponse> {\n return this.request(\n 'POST',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/start`,\n { body: params },\n );\n }\n\n /**\n * Pause a started test: its audience sees what it would without the test.\n *\n * `POST /routing/checkout-theme/experiments/{experiment_id}/pause`\n */\n async pause(\n experimentId: string,\n params: ExperimentTransitionRequest,\n ): Promise<ExperimentChangeResponse> {\n return this.request(\n 'POST',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/pause`,\n { body: params },\n );\n }\n\n /**\n * Resume a paused test. Returning buyers keep the look drawn for them.\n *\n * `POST /routing/checkout-theme/experiments/{experiment_id}/resume`\n */\n async resume(\n experimentId: string,\n params: ExperimentTransitionRequest,\n ): Promise<ExperimentChangeResponse> {\n return this.request(\n 'POST',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/resume`,\n { body: params },\n );\n }\n\n /**\n * End a test. With `keep_arm`, its audience keeps seeing that arm's look;\n * without it, what it would see without the test.\n *\n * `POST /routing/checkout-theme/experiments/{experiment_id}/end`\n */\n async end(experimentId: string, params: ExperimentEndRequest): Promise<ExperimentChangeResponse> {\n return this.request(\n 'POST',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/end`,\n { body: params },\n );\n }\n\n /**\n * Start an ended test again, as a new version, optionally changing what it\n * compares in the same step.\n *\n * `POST /routing/checkout-theme/experiments/{experiment_id}/restart`\n */\n async restart(\n experimentId: string,\n params: ExperimentRestartRequest,\n ): Promise<ExperimentChangeResponse> {\n return this.request(\n 'POST',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/restart`,\n { body: params },\n );\n }\n\n /**\n * Put a draft or an ended test away. Its results stay readable. A test that\n * is scheduled, running or paused is refused with `IR_16`: end it first.\n *\n * `POST /routing/checkout-theme/experiments/{experiment_id}/archive`\n */\n async archive(\n experimentId: string,\n params: ExperimentTransitionRequest,\n ): Promise<ExperimentChangeResponse> {\n return this.request(\n 'POST',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/archive`,\n { body: params },\n );\n }\n\n /**\n * A test's history: who created, changed, started, paused, ended or moved it.\n *\n * `GET /routing/checkout-theme/experiments/{experiment_id}/events`\n */\n async events(experimentId: string): Promise<ExperimentEventsResponse> {\n return this.request(\n 'GET',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/events`,\n );\n }\n\n /**\n * A test's results for one version and one environment.\n *\n * `GET /routing/checkout-theme/experiments/{experiment_id}/results`\n *\n * Rates, intervals, verdicts and the sample-ratio check are computed\n * server-side and shipped as values: show them as they are rather than\n * recomputing them. A 404 means no such test or version, or a test that has\n * not started.\n *\n * @example\n * ```typescript\n * const results = await delopay.routing.checkoutExperiments.results('cexp_...', {\n * segment: 'device',\n * });\n * for (const c of results.comparisons) {\n * if (c.verdict === 'better') console.log(`${c.arm} converts better than ${c.control_arm}`);\n * }\n * ```\n */\n async results(\n experimentId: string,\n params: ExperimentResultsQuery = {},\n ): Promise<ExperimentResultsResponse> {\n return this.request(\n 'GET',\n `/routing/checkout-theme/experiments/${encodeURIComponent(experimentId)}/results`,\n {\n query: {\n version: params.version ?? undefined,\n test_mode: params.test_mode,\n segment: params.segment ?? undefined,\n },\n },\n );\n }\n\n /**\n * Every started, not archived test of a shop or template, in brief: the\n * version in force, its counts, and the arm clearly ahead, if any.\n *\n * `GET /routing/checkout-theme/experiments/results-summary`\n */\n async resultsSummary(\n params: ExperimentResultsSummaryQuery = {},\n ): Promise<ExperimentResultsSummaryResponse> {\n return this.request('GET', '/routing/checkout-theme/experiments/results-summary', {\n query: {\n profile_id: params.profile_id ?? undefined,\n test_mode: params.test_mode,\n },\n });\n }\n}\n\n/**\n * Which look a buyer would see, and why, and what look targeting can do in\n * this deployment.\n */\nclass CheckoutTargeting {\n constructor(private readonly request: RequestFn) {}\n\n /**\n * What a described buyer would see in a shop or template, and why: the look\n * the link names, the tests in their order, the look rules, the look for the\n * kind of payment, the default. Reads what is stored now and writes nothing;\n * a test answers with its arms rather than drawing one.\n *\n * `POST /routing/checkout-theme/simulate`\n *\n * Pass `program` to try look rules before saving them: they stand in for the\n * stored rules of their scope for this dry run only.\n *\n * @example\n * ```typescript\n * const outcome = await delopay.routing.checkoutTargeting.simulate({\n * profile_id: 'pro_...',\n * device: 'phone',\n * country: 'DE',\n * });\n * console.log(outcome.source, outcome.look ?? 'default look');\n * ```\n */\n async simulate(params: TargetingSimulateRequest): Promise<TargetingSimulateResponse> {\n return this.request('POST', '/routing/checkout-theme/simulate', { body: params });\n }\n\n /**\n * Whether looks are chosen at render, whether renders are measured, whether\n * buyer signals and browser identity are available, and the test limits.\n *\n * `GET /routing/checkout-theme/capabilities?profile_id={profileId}`\n *\n * @param profileId - The shop or template. A shop-scoped caller may omit it.\n */\n async capabilities(profileId?: string): Promise<TargetingCapabilitiesResponse> {\n return this.request('GET', '/routing/checkout-theme/capabilities', {\n query: { profile_id: profileId },\n });\n }\n}\n"],"mappings":";AAoEO,IAAM,UAAN,MAAc;AAAA,EAanB,YAA6B,SAAoB;AAApB;AAC3B,SAAK,WAAW,IAAI,uBAAuB,OAAO;AAClD,SAAK,iBAAiB,IAAI,eAAe,OAAO;AAChD,SAAK,qBAAqB,IAAI,mBAAmB,OAAO;AACxD,SAAK,0BAA0B,IAAI,wBAAwB,OAAO;AAClE,SAAK,sBAAsB,IAAI,oBAAoB,OAAO;AAC1D,SAAK,oBAAoB,IAAI,kBAAkB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ACA,uCAAuC,mBAAmB,YAAY,CAAC;AAAA,MACvE;AAAA,QACE,OAAO;AAAA,UACL,SAAS,OAAO,WAAW;AAAA,UAC3B,WAAW,OAAO;AAAA,UAClB,SAAS,OAAO,WAAW;AAAA,QAC7B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,eACJ,SAAwC,CAAC,GACE;AAC3C,WAAO,KAAK,QAAQ,OAAO,uDAAuD;AAAA,MAChF,OAAO;AAAA,QACL,YAAY,OAAO,cAAc;AAAA,QACjC,WAAW,OAAO;AAAA,MACpB;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAMA,IAAM,oBAAN,MAAwB;AAAA,EACtB,YAA6B,SAAoB;AAApB;AAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBlD,MAAM,SAAS,QAAsE;AACnF,WAAO,KAAK,QAAQ,QAAQ,oCAAoC,EAAE,MAAM,OAAO,CAAC;AAAA,EAClF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAM,aAAa,WAA4D;AAC7E,WAAO,KAAK,QAAQ,OAAO,wCAAwC;AAAA,MACjE,OAAO,EAAE,YAAY,UAAU;AAAA,IACjC,CAAC;AAAA,EACH;AACF;","names":[]}
package/dist/client.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNBTLJWDQcjs = require('./chunk-NBTLJWDQ.cjs');
3
+ var _chunkQQZQ2RHXcjs = require('./chunk-QQZQ2RHX.cjs');
4
4
 
5
5
 
6
6
  var _chunkO7SQCN44cjs = require('./chunk-O7SQCN44.cjs');
@@ -13,5 +13,5 @@ var _chunkI2W7AO4Bcjs = require('./chunk-I2W7AO4B.cjs');
13
13
 
14
14
 
15
15
 
16
- exports.Delopay = _chunkNBTLJWDQcjs.Delopay; exports.DelopayAuthenticationError = _chunkI2W7AO4Bcjs.DelopayAuthenticationError; exports.DelopayCore = _chunkO7SQCN44cjs.DelopayCore; exports.DelopayError = _chunkI2W7AO4Bcjs.DelopayError;
16
+ exports.Delopay = _chunkQQZQ2RHXcjs.Delopay; exports.DelopayAuthenticationError = _chunkI2W7AO4Bcjs.DelopayAuthenticationError; exports.DelopayCore = _chunkO7SQCN44cjs.DelopayCore; exports.DelopayError = _chunkI2W7AO4Bcjs.DelopayError;
17
17
  //# sourceMappingURL=client.cjs.map
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Delopay
3
- } from "./chunk-SC7GAGDL.js";
3
+ } from "./chunk-4ALYDKJF.js";
4
4
  import {
5
5
  DelopayCore
6
6
  } from "./chunk-BN5SIRFO.js";