@domino-sdk/relay 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -1494,12 +1494,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1494
1494
  kind: "resource";
1495
1495
  default: string;
1496
1496
  source: {
1497
+ provider: "domino";
1498
+ resource: "point-ledger";
1499
+ } | {
1497
1500
  provider: "discord";
1498
1501
  resource: "channel";
1499
1502
  types: ("text" | "announcement")[];
1500
- } | {
1501
- provider: "domino";
1502
- resource: "point-ledger";
1503
1503
  } | {
1504
1504
  provider: "discord";
1505
1505
  resource: "role";
@@ -1608,7 +1608,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1608
1608
  budgets: {
1609
1609
  id: string;
1610
1610
  scope: "project" | "member";
1611
- period: "lifetime" | "day";
1611
+ period: "day" | "lifetime";
1612
1612
  limit: number;
1613
1613
  cost: number | {
1614
1614
  balance: string;
@@ -1657,12 +1657,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1657
1657
  kind: "resource";
1658
1658
  default: string;
1659
1659
  source: {
1660
+ provider: "domino";
1661
+ resource: "point-ledger";
1662
+ } | {
1660
1663
  provider: "discord";
1661
1664
  resource: "channel";
1662
1665
  types: ("text" | "announcement")[];
1663
- } | {
1664
- provider: "domino";
1665
- resource: "point-ledger";
1666
1666
  } | {
1667
1667
  provider: "discord";
1668
1668
  resource: "role";
@@ -1771,7 +1771,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1771
1771
  budgets: {
1772
1772
  id: string;
1773
1773
  scope: "project" | "member";
1774
- period: "lifetime" | "day";
1774
+ period: "day" | "lifetime";
1775
1775
  limit: number;
1776
1776
  cost: number | {
1777
1777
  balance: string;
@@ -1819,12 +1819,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1819
1819
  kind: "resource";
1820
1820
  default: string;
1821
1821
  source: {
1822
+ provider: "domino";
1823
+ resource: "point-ledger";
1824
+ } | {
1822
1825
  provider: "discord";
1823
1826
  resource: "channel";
1824
1827
  types: ("text" | "announcement")[];
1825
- } | {
1826
- provider: "domino";
1827
- resource: "point-ledger";
1828
1828
  } | {
1829
1829
  provider: "discord";
1830
1830
  resource: "role";
@@ -1933,7 +1933,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1933
1933
  budgets: {
1934
1934
  id: string;
1935
1935
  scope: "project" | "member";
1936
- period: "lifetime" | "day";
1936
+ period: "day" | "lifetime";
1937
1937
  limit: number;
1938
1938
  cost: number | {
1939
1939
  balance: string;
@@ -2156,12 +2156,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2156
2156
  kind: "resource";
2157
2157
  default: string;
2158
2158
  source: {
2159
+ provider: "domino";
2160
+ resource: "point-ledger";
2161
+ } | {
2159
2162
  provider: "discord";
2160
2163
  resource: "channel";
2161
2164
  types: ("text" | "announcement")[];
2162
- } | {
2163
- provider: "domino";
2164
- resource: "point-ledger";
2165
2165
  } | {
2166
2166
  provider: "discord";
2167
2167
  resource: "role";
@@ -2270,7 +2270,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2270
2270
  budgets: {
2271
2271
  id: string;
2272
2272
  scope: "project" | "member";
2273
- period: "lifetime" | "day";
2273
+ period: "day" | "lifetime";
2274
2274
  limit: number;
2275
2275
  cost: number | {
2276
2276
  balance: string;
@@ -2347,12 +2347,12 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2347
2347
  kind: "resource";
2348
2348
  default: string;
2349
2349
  source: {
2350
+ provider: "domino";
2351
+ resource: "point-ledger";
2352
+ } | {
2350
2353
  provider: "discord";
2351
2354
  resource: "channel";
2352
2355
  types: ("text" | "announcement")[];
2353
- } | {
2354
- provider: "domino";
2355
- resource: "point-ledger";
2356
2356
  } | {
2357
2357
  provider: "discord";
2358
2358
  resource: "role";
@@ -2461,7 +2461,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2461
2461
  budgets: {
2462
2462
  id: string;
2463
2463
  scope: "project" | "member";
2464
- period: "lifetime" | "day";
2464
+ period: "day" | "lifetime";
2465
2465
  limit: number;
2466
2466
  cost: number | {
2467
2467
  balance: string;
package/dist/browser.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-Y6H4HDQT.js";
3
+ } from "./chunk-ATLYA27Y.js";
4
4
  import "./chunk-Q5VDZVVO.js";
5
5
  import "./chunk-MVDE7WKB.js";
6
6
  import "./chunk-XTFCKK2Y.js";
@@ -1063,6 +1063,7 @@ function createRelayClient(options) {
1063
1063
  "X-Relay-Session": session
1064
1064
  }
1065
1065
  }),
1066
+ /** @deprecated The participant API does not verify passes. Verify them on your server and call `POST /management/v1/passes/verify`. */
1066
1067
  linkPass: (code) => request("/v1/me/pass", attemptSchema, json({ code })),
1067
1068
  progress: () => request("/v1/me/progress", memberProgressSchema),
1068
1069
  rewardDeliveries: () => request("/v1/reward-deliveries", rewardDeliveriesSchema),
@@ -1079,6 +1080,7 @@ function createRelayClient(options) {
1079
1080
  body: file
1080
1081
  })
1081
1082
  },
1083
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1082
1084
  reviews: {
1083
1085
  list: (options2 = {}, requestOptions) => request(
1084
1086
  query("/v1/reviews", reviewListSchema.parse(options2)),
@@ -1086,6 +1088,7 @@ function createRelayClient(options) {
1086
1088
  requestOptions
1087
1089
  )
1088
1090
  },
1091
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1089
1092
  members: {
1090
1093
  list: (options2 = {}, requestOptions) => request(
1091
1094
  query("/v1/members", memberListSchema.parse(options2)),
@@ -1105,15 +1108,21 @@ function createRelayClient(options) {
1105
1108
  return response.blob();
1106
1109
  }
1107
1110
  },
1111
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1108
1112
  lookupMember: (issuer, subject) => request(
1109
1113
  "/v1/members/lookup",
1110
1114
  z9.object({ member: z9.string() }),
1111
1115
  json({ issuer, subject })
1112
1116
  ),
1117
+ /** @deprecated Removed from the participant API. Build quests with `domino` and `@domino-sdk/relay/build`. */
1113
1118
  journeyTemplate: () => request("/v1/journey-template", z9.array(templateSchema)),
1119
+ /** @deprecated Removed from the participant API. Build quests with `domino` and `@domino-sdk/relay/build`. */
1114
1120
  template: () => request("/v1/template", templateSchema),
1121
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1115
1122
  snapshot: () => request("/v1/snapshot", snapshotSchema),
1123
+ /** @deprecated The participant API rejects publication. Publish with `domino deploy` or the management API. */
1116
1124
  publish: (release) => request("/v1/releases", publishedReleaseSchema, json(release)),
1125
+ /** @deprecated The participant API rejects publication. Publish with `domino deploy` or the management API. */
1117
1126
  publishBatch: (releases) => request(
1118
1127
  "/v1/releases/batch",
1119
1128
  z9.array(publishedReleaseSchema),
@@ -1123,7 +1132,9 @@ function createRelayClient(options) {
1123
1132
  `/v1/members/${encodeURIComponent(member)}/progress`,
1124
1133
  memberProgressSchema
1125
1134
  ),
1135
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1126
1136
  beginHandover: (id, input) => request(`/v1/entitlements/${id}/begin`, entitlementSchema, json(input)),
1137
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1127
1138
  confirmHandover: (id, input) => request(`/v1/entitlements/${id}/confirm`, entitlementSchema, json(input)),
1128
1139
  upload: (member, file) => request(
1129
1140
  `/v1/evidence?member=${encodeURIComponent(member)}`,
@@ -1136,6 +1147,7 @@ function createRelayClient(options) {
1136
1147
  ),
1137
1148
  submit: (input) => request("/v1/attempts", attemptSchema, json(input)),
1138
1149
  retry: (id) => request(`/v1/attempts/${id}/retry`, attemptSchema, json({})),
1150
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
1139
1151
  decide: (id, input) => request(`/v1/attempts/${id}/review`, attemptSchema, json(input))
1140
1152
  };
1141
1153
  }
package/dist/index.d.ts CHANGED
@@ -375,8 +375,8 @@ declare const questTypeVersionSchema: z.ZodObject<{
375
375
  member: "member";
376
376
  }>;
377
377
  period: z.ZodEnum<{
378
- lifetime: "lifetime";
379
378
  day: "day";
379
+ lifetime: "lifetime";
380
380
  }>;
381
381
  limit: z.ZodNumber;
382
382
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -406,7 +406,7 @@ declare const collectionSlotDeclarationSchema: z.ZodPipe<z.ZodObject<{
406
406
  title: string;
407
407
  key?: string | undefined;
408
408
  id?: string | undefined;
409
- }, "id" | "key"> & {
409
+ }, "key" | "id"> & {
410
410
  key: string;
411
411
  }, {
412
412
  title: string;
@@ -717,8 +717,8 @@ declare const questCatalogSchema: z.ZodObject<{
717
717
  member: "member";
718
718
  }>;
719
719
  period: z.ZodEnum<{
720
- lifetime: "lifetime";
721
720
  day: "day";
721
+ lifetime: "lifetime";
722
722
  }>;
723
723
  limit: z.ZodNumber;
724
724
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -1003,8 +1003,8 @@ declare const questCatalogSchema: z.ZodObject<{
1003
1003
  member: "member";
1004
1004
  }>;
1005
1005
  period: z.ZodEnum<{
1006
- lifetime: "lifetime";
1007
1006
  day: "day";
1007
+ lifetime: "lifetime";
1008
1008
  }>;
1009
1009
  limit: z.ZodNumber;
1010
1010
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -1133,12 +1133,12 @@ declare const questCatalogSchema: z.ZodObject<{
1133
1133
  kind: "resource";
1134
1134
  default: string;
1135
1135
  source: {
1136
+ provider: "domino";
1137
+ resource: "point-ledger";
1138
+ } | {
1136
1139
  provider: "discord";
1137
1140
  resource: "channel";
1138
1141
  types: ("text" | "announcement")[];
1139
- } | {
1140
- provider: "domino";
1141
- resource: "point-ledger";
1142
1142
  } | {
1143
1143
  provider: "discord";
1144
1144
  resource: "role";
@@ -1247,7 +1247,7 @@ declare const questCatalogSchema: z.ZodObject<{
1247
1247
  budgets: {
1248
1248
  id: string;
1249
1249
  scope: "project" | "member";
1250
- period: "lifetime" | "day";
1250
+ period: "day" | "lifetime";
1251
1251
  limit: number;
1252
1252
  cost: number | {
1253
1253
  balance: string;
@@ -1345,7 +1345,7 @@ declare const catalogDeploymentSchema: z.ZodObject<{
1345
1345
  title: string;
1346
1346
  key?: string | undefined;
1347
1347
  id?: string | undefined;
1348
- }, "id" | "key"> & {
1348
+ }, "key" | "id"> & {
1349
1349
  key: string;
1350
1350
  }, {
1351
1351
  title: string;
@@ -1539,8 +1539,8 @@ declare const catalogDeploymentPreviewSchema: z.ZodObject<{
1539
1539
  member: "member";
1540
1540
  }>;
1541
1541
  period: z.ZodEnum<{
1542
- lifetime: "lifetime";
1543
1542
  day: "day";
1543
+ lifetime: "lifetime";
1544
1544
  }>;
1545
1545
  limit: z.ZodNumber;
1546
1546
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -2537,8 +2537,8 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2537
2537
  member: "member";
2538
2538
  }>;
2539
2539
  period: z.ZodEnum<{
2540
- lifetime: "lifetime";
2541
2540
  day: "day";
2541
+ lifetime: "lifetime";
2542
2542
  }>;
2543
2543
  limit: z.ZodNumber;
2544
2544
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -2667,12 +2667,12 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2667
2667
  kind: "resource";
2668
2668
  default: string;
2669
2669
  source: {
2670
+ provider: "domino";
2671
+ resource: "point-ledger";
2672
+ } | {
2670
2673
  provider: "discord";
2671
2674
  resource: "channel";
2672
2675
  types: ("text" | "announcement")[];
2673
- } | {
2674
- provider: "domino";
2675
- resource: "point-ledger";
2676
2676
  } | {
2677
2677
  provider: "discord";
2678
2678
  resource: "role";
@@ -2781,7 +2781,7 @@ declare const questPublicationPreviewSchema: z.ZodObject<{
2781
2781
  budgets: {
2782
2782
  id: string;
2783
2783
  scope: "project" | "member";
2784
- period: "lifetime" | "day";
2784
+ period: "day" | "lifetime";
2785
2785
  limit: number;
2786
2786
  cost: number | {
2787
2787
  balance: string;
@@ -3097,12 +3097,6 @@ declare function questConfiguration(release: PublishedRelease): {
3097
3097
 
3098
3098
  /** Non-quest resources in the private hosted-build catalog artifact. */
3099
3099
  declare const projectCatalogArtifactSchema: z.ZodObject<{
3100
- types: z.ZodDefault<z.ZodArray<z.ZodObject<{
3101
- code: z.ZodString;
3102
- provider: z.ZodEnum<{
3103
- "workers-ai": "workers-ai";
3104
- }>;
3105
- }, z.core.$strip>>>;
3106
3100
  collections: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
3107
3101
  title: z.ZodString;
3108
3102
  key: z.ZodOptional<z.ZodString>;
@@ -3111,13 +3105,19 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
3111
3105
  title: string;
3112
3106
  key?: string | undefined;
3113
3107
  id?: string | undefined;
3114
- }, "id" | "key"> & {
3108
+ }, "key" | "id"> & {
3115
3109
  key: string;
3116
3110
  }, {
3117
3111
  title: string;
3118
3112
  key?: string | undefined;
3119
3113
  id?: string | undefined;
3120
3114
  }>>>>;
3115
+ types: z.ZodDefault<z.ZodArray<z.ZodObject<{
3116
+ code: z.ZodString;
3117
+ provider: z.ZodEnum<{
3118
+ "workers-ai": "workers-ai";
3119
+ }>;
3120
+ }, z.core.$strip>>>;
3121
3121
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3122
3122
  staff: "staff";
3123
3123
  quiz: "quiz";
@@ -3320,7 +3320,7 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
3320
3320
  inviterGroup?: string | undefined;
3321
3321
  key?: string | undefined;
3322
3322
  id?: string | undefined;
3323
- }, "id" | "key"> & {
3323
+ }, "key" | "id"> & {
3324
3324
  key: string;
3325
3325
  }, {
3326
3326
  title: string;
@@ -3421,9 +3421,8 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
3421
3421
  code: z.ZodString;
3422
3422
  }, z.core.$strict>]>>>;
3423
3423
  leaderboards: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
3424
- balance: z.ZodString;
3425
- group: z.ZodOptional<z.ZodString>;
3426
3424
  title: z.ZodString;
3425
+ balance: z.ZodString;
3427
3426
  score: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
3428
3427
  kind: z.ZodLiteral<"balance">;
3429
3428
  }, z.core.$strict>, z.ZodObject<{
@@ -3472,11 +3471,12 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
3472
3471
  participants: "participants";
3473
3472
  public: "public";
3474
3473
  }>>;
3474
+ group: z.ZodOptional<z.ZodString>;
3475
3475
  key: z.ZodOptional<z.ZodString>;
3476
3476
  id: z.ZodOptional<z.ZodString>;
3477
3477
  }, z.core.$strict>, z.ZodTransform<Omit<{
3478
- balance: string;
3479
3478
  title: string;
3479
+ balance: string;
3480
3480
  score: {
3481
3481
  kind: "balance";
3482
3482
  } | {
@@ -3517,11 +3517,11 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
3517
3517
  group?: string | undefined;
3518
3518
  key?: string | undefined;
3519
3519
  id?: string | undefined;
3520
- }, "id" | "key"> & {
3520
+ }, "key" | "id"> & {
3521
3521
  key: string;
3522
3522
  }, {
3523
- balance: string;
3524
3523
  title: string;
3524
+ balance: string;
3525
3525
  score: {
3526
3526
  kind: "balance";
3527
3527
  } | {
@@ -3568,12 +3568,6 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
3568
3568
  }, z.core.$strict>;
3569
3569
  /** One manifest bundle. Missing entries never delete remotely owned resources. */
3570
3570
  declare const projectDeploymentSchema: z.ZodObject<{
3571
- types: z.ZodDefault<z.ZodArray<z.ZodObject<{
3572
- code: z.ZodString;
3573
- provider: z.ZodEnum<{
3574
- "workers-ai": "workers-ai";
3575
- }>;
3576
- }, z.core.$strip>>>;
3577
3571
  collections: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
3578
3572
  title: z.ZodString;
3579
3573
  key: z.ZodOptional<z.ZodString>;
@@ -3582,13 +3576,19 @@ declare const projectDeploymentSchema: z.ZodObject<{
3582
3576
  title: string;
3583
3577
  key?: string | undefined;
3584
3578
  id?: string | undefined;
3585
- }, "id" | "key"> & {
3579
+ }, "key" | "id"> & {
3586
3580
  key: string;
3587
3581
  }, {
3588
3582
  title: string;
3589
3583
  key?: string | undefined;
3590
3584
  id?: string | undefined;
3591
3585
  }>>>>;
3586
+ types: z.ZodDefault<z.ZodArray<z.ZodObject<{
3587
+ code: z.ZodString;
3588
+ provider: z.ZodEnum<{
3589
+ "workers-ai": "workers-ai";
3590
+ }>;
3591
+ }, z.core.$strip>>>;
3592
3592
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3593
3593
  staff: "staff";
3594
3594
  quiz: "quiz";
@@ -3791,7 +3791,7 @@ declare const projectDeploymentSchema: z.ZodObject<{
3791
3791
  inviterGroup?: string | undefined;
3792
3792
  key?: string | undefined;
3793
3793
  id?: string | undefined;
3794
- }, "id" | "key"> & {
3794
+ }, "key" | "id"> & {
3795
3795
  key: string;
3796
3796
  }, {
3797
3797
  title: string;
@@ -3892,9 +3892,8 @@ declare const projectDeploymentSchema: z.ZodObject<{
3892
3892
  code: z.ZodString;
3893
3893
  }, z.core.$strict>]>>>;
3894
3894
  leaderboards: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
3895
- balance: z.ZodString;
3896
- group: z.ZodOptional<z.ZodString>;
3897
3895
  title: z.ZodString;
3896
+ balance: z.ZodString;
3898
3897
  score: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
3899
3898
  kind: z.ZodLiteral<"balance">;
3900
3899
  }, z.core.$strict>, z.ZodObject<{
@@ -3943,11 +3942,12 @@ declare const projectDeploymentSchema: z.ZodObject<{
3943
3942
  participants: "participants";
3944
3943
  public: "public";
3945
3944
  }>>;
3945
+ group: z.ZodOptional<z.ZodString>;
3946
3946
  key: z.ZodOptional<z.ZodString>;
3947
3947
  id: z.ZodOptional<z.ZodString>;
3948
3948
  }, z.core.$strict>, z.ZodTransform<Omit<{
3949
- balance: string;
3950
3949
  title: string;
3950
+ balance: string;
3951
3951
  score: {
3952
3952
  kind: "balance";
3953
3953
  } | {
@@ -3988,11 +3988,11 @@ declare const projectDeploymentSchema: z.ZodObject<{
3988
3988
  group?: string | undefined;
3989
3989
  key?: string | undefined;
3990
3990
  id?: string | undefined;
3991
- }, "id" | "key"> & {
3991
+ }, "key" | "id"> & {
3992
3992
  key: string;
3993
3993
  }, {
3994
- balance: string;
3995
3994
  title: string;
3995
+ balance: string;
3996
3996
  score: {
3997
3997
  kind: "balance";
3998
3998
  } | {
@@ -4234,8 +4234,8 @@ declare const deploymentPreviewSchema: z.ZodObject<{
4234
4234
  member: "member";
4235
4235
  }>;
4236
4236
  period: z.ZodEnum<{
4237
- lifetime: "lifetime";
4238
4237
  day: "day";
4238
+ lifetime: "lifetime";
4239
4239
  }>;
4240
4240
  limit: z.ZodNumber;
4241
4241
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -4364,12 +4364,12 @@ declare const deploymentPreviewSchema: z.ZodObject<{
4364
4364
  kind: "resource";
4365
4365
  default: string;
4366
4366
  source: {
4367
+ provider: "domino";
4368
+ resource: "point-ledger";
4369
+ } | {
4367
4370
  provider: "discord";
4368
4371
  resource: "channel";
4369
4372
  types: ("text" | "announcement")[];
4370
- } | {
4371
- provider: "domino";
4372
- resource: "point-ledger";
4373
4373
  } | {
4374
4374
  provider: "discord";
4375
4375
  resource: "role";
@@ -4478,7 +4478,7 @@ declare const deploymentPreviewSchema: z.ZodObject<{
4478
4478
  budgets: {
4479
4479
  id: string;
4480
4480
  scope: "project" | "member";
4481
- period: "lifetime" | "day";
4481
+ period: "day" | "lifetime";
4482
4482
  limit: number;
4483
4483
  cost: number | {
4484
4484
  balance: string;
@@ -4729,8 +4729,8 @@ declare const deploymentPreviewSchema: z.ZodObject<{
4729
4729
  member: "member";
4730
4730
  }>;
4731
4731
  period: z.ZodEnum<{
4732
- lifetime: "lifetime";
4733
4732
  day: "day";
4733
+ lifetime: "lifetime";
4734
4734
  }>;
4735
4735
  limit: z.ZodNumber;
4736
4736
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -5185,8 +5185,8 @@ declare const deploymentResultSchema: z.ZodObject<{
5185
5185
  member: "member";
5186
5186
  }>;
5187
5187
  period: z.ZodEnum<{
5188
- lifetime: "lifetime";
5189
5188
  day: "day";
5189
+ lifetime: "lifetime";
5190
5190
  }>;
5191
5191
  limit: z.ZodNumber;
5192
5192
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -5315,12 +5315,12 @@ declare const deploymentResultSchema: z.ZodObject<{
5315
5315
  kind: "resource";
5316
5316
  default: string;
5317
5317
  source: {
5318
+ provider: "domino";
5319
+ resource: "point-ledger";
5320
+ } | {
5318
5321
  provider: "discord";
5319
5322
  resource: "channel";
5320
5323
  types: ("text" | "announcement")[];
5321
- } | {
5322
- provider: "domino";
5323
- resource: "point-ledger";
5324
5324
  } | {
5325
5325
  provider: "discord";
5326
5326
  resource: "role";
@@ -5429,7 +5429,7 @@ declare const deploymentResultSchema: z.ZodObject<{
5429
5429
  budgets: {
5430
5430
  id: string;
5431
5431
  scope: "project" | "member";
5432
- period: "lifetime" | "day";
5432
+ period: "day" | "lifetime";
5433
5433
  limit: number;
5434
5434
  cost: number | {
5435
5435
  balance: string;
@@ -5680,8 +5680,8 @@ declare const deploymentResultSchema: z.ZodObject<{
5680
5680
  member: "member";
5681
5681
  }>;
5682
5682
  period: z.ZodEnum<{
5683
- lifetime: "lifetime";
5684
5683
  day: "day";
5684
+ lifetime: "lifetime";
5685
5685
  }>;
5686
5686
  limit: z.ZodNumber;
5687
5687
  cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
@@ -7039,6 +7039,7 @@ declare function createRelayClient(options: {
7039
7039
  expiresAt: number;
7040
7040
  entitlement: string;
7041
7041
  }>;
7042
+ /** @deprecated The participant API does not verify passes. Verify them on your server and call `POST /management/v1/passes/verify`. */
7042
7043
  linkPass: (code: string) => Promise<{
7043
7044
  id: string;
7044
7045
  release: string;
@@ -7365,6 +7366,7 @@ declare function createRelayClient(options: {
7365
7366
  size: number;
7366
7367
  }>;
7367
7368
  };
7369
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
7368
7370
  reviews: {
7369
7371
  list: (options?: ReviewListOptions, requestOptions?: {
7370
7372
  signal?: AbortSignal;
@@ -7429,6 +7431,7 @@ declare function createRelayClient(options: {
7429
7431
  nextCursor: string | null;
7430
7432
  }>;
7431
7433
  };
7434
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
7432
7435
  members: {
7433
7436
  list: (options?: MemberListOptions, requestOptions?: {
7434
7437
  signal?: AbortSignal;
@@ -7444,9 +7447,11 @@ declare function createRelayClient(options: {
7444
7447
  signal?: AbortSignal;
7445
7448
  }): Promise<Blob>;
7446
7449
  };
7450
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
7447
7451
  lookupMember: (issuer: string, subject: string) => Promise<{
7448
7452
  member: string;
7449
7453
  }>;
7454
+ /** @deprecated Removed from the participant API. Build quests with `domino` and `@domino-sdk/relay/build`. */
7450
7455
  journeyTemplate: () => Promise<{
7451
7456
  code: string;
7452
7457
  definition: {
@@ -7488,12 +7493,12 @@ declare function createRelayClient(options: {
7488
7493
  kind: "resource";
7489
7494
  default: string;
7490
7495
  source: {
7496
+ provider: "domino";
7497
+ resource: "point-ledger";
7498
+ } | {
7491
7499
  provider: "discord";
7492
7500
  resource: "channel";
7493
7501
  types: ("text" | "announcement")[];
7494
- } | {
7495
- provider: "domino";
7496
- resource: "point-ledger";
7497
7502
  } | {
7498
7503
  provider: "discord";
7499
7504
  resource: "role";
@@ -7602,7 +7607,7 @@ declare function createRelayClient(options: {
7602
7607
  budgets: {
7603
7608
  id: string;
7604
7609
  scope: "project" | "member";
7605
- period: "lifetime" | "day";
7610
+ period: "day" | "lifetime";
7606
7611
  limit: number;
7607
7612
  cost: number | {
7608
7613
  balance: string;
@@ -7610,6 +7615,7 @@ declare function createRelayClient(options: {
7610
7615
  }[];
7611
7616
  };
7612
7617
  }[]>;
7618
+ /** @deprecated Removed from the participant API. Build quests with `domino` and `@domino-sdk/relay/build`. */
7613
7619
  template: () => Promise<{
7614
7620
  code: string;
7615
7621
  definition: {
@@ -7651,12 +7657,12 @@ declare function createRelayClient(options: {
7651
7657
  kind: "resource";
7652
7658
  default: string;
7653
7659
  source: {
7660
+ provider: "domino";
7661
+ resource: "point-ledger";
7662
+ } | {
7654
7663
  provider: "discord";
7655
7664
  resource: "channel";
7656
7665
  types: ("text" | "announcement")[];
7657
- } | {
7658
- provider: "domino";
7659
- resource: "point-ledger";
7660
7666
  } | {
7661
7667
  provider: "discord";
7662
7668
  resource: "role";
@@ -7765,7 +7771,7 @@ declare function createRelayClient(options: {
7765
7771
  budgets: {
7766
7772
  id: string;
7767
7773
  scope: "project" | "member";
7768
- period: "lifetime" | "day";
7774
+ period: "day" | "lifetime";
7769
7775
  limit: number;
7770
7776
  cost: number | {
7771
7777
  balance: string;
@@ -7773,6 +7779,7 @@ declare function createRelayClient(options: {
7773
7779
  }[];
7774
7780
  };
7775
7781
  }>;
7782
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
7776
7783
  snapshot: () => Promise<{
7777
7784
  releases: {
7778
7785
  quest: string;
@@ -7813,12 +7820,12 @@ declare function createRelayClient(options: {
7813
7820
  kind: "resource";
7814
7821
  default: string;
7815
7822
  source: {
7823
+ provider: "domino";
7824
+ resource: "point-ledger";
7825
+ } | {
7816
7826
  provider: "discord";
7817
7827
  resource: "channel";
7818
7828
  types: ("text" | "announcement")[];
7819
- } | {
7820
- provider: "domino";
7821
- resource: "point-ledger";
7822
7829
  } | {
7823
7830
  provider: "discord";
7824
7831
  resource: "role";
@@ -7927,7 +7934,7 @@ declare function createRelayClient(options: {
7927
7934
  budgets: {
7928
7935
  id: string;
7929
7936
  scope: "project" | "member";
7930
- period: "lifetime" | "day";
7937
+ period: "day" | "lifetime";
7931
7938
  limit: number;
7932
7939
  cost: number | {
7933
7940
  balance: string;
@@ -8111,6 +8118,7 @@ declare function createRelayClient(options: {
8111
8118
  at: number;
8112
8119
  }[];
8113
8120
  }>;
8121
+ /** @deprecated The participant API rejects publication. Publish with `domino deploy` or the management API. */
8114
8122
  publish: (release: ReleaseInput) => Promise<{
8115
8123
  quest: string;
8116
8124
  runtimeVersion: 2 | 1;
@@ -8150,12 +8158,12 @@ declare function createRelayClient(options: {
8150
8158
  kind: "resource";
8151
8159
  default: string;
8152
8160
  source: {
8161
+ provider: "domino";
8162
+ resource: "point-ledger";
8163
+ } | {
8153
8164
  provider: "discord";
8154
8165
  resource: "channel";
8155
8166
  types: ("text" | "announcement")[];
8156
- } | {
8157
- provider: "domino";
8158
- resource: "point-ledger";
8159
8167
  } | {
8160
8168
  provider: "discord";
8161
8169
  resource: "role";
@@ -8264,7 +8272,7 @@ declare function createRelayClient(options: {
8264
8272
  budgets: {
8265
8273
  id: string;
8266
8274
  scope: "project" | "member";
8267
- period: "lifetime" | "day";
8275
+ period: "day" | "lifetime";
8268
8276
  limit: number;
8269
8277
  cost: number | {
8270
8278
  balance: string;
@@ -8302,6 +8310,7 @@ declare function createRelayClient(options: {
8302
8310
  preserved: string[];
8303
8311
  } | undefined;
8304
8312
  }>;
8313
+ /** @deprecated The participant API rejects publication. Publish with `domino deploy` or the management API. */
8305
8314
  publishBatch: (releases: ReleaseInput[]) => Promise<{
8306
8315
  quest: string;
8307
8316
  runtimeVersion: 2 | 1;
@@ -8341,12 +8350,12 @@ declare function createRelayClient(options: {
8341
8350
  kind: "resource";
8342
8351
  default: string;
8343
8352
  source: {
8353
+ provider: "domino";
8354
+ resource: "point-ledger";
8355
+ } | {
8344
8356
  provider: "discord";
8345
8357
  resource: "channel";
8346
8358
  types: ("text" | "announcement")[];
8347
- } | {
8348
- provider: "domino";
8349
- resource: "point-ledger";
8350
8359
  } | {
8351
8360
  provider: "discord";
8352
8361
  resource: "role";
@@ -8455,7 +8464,7 @@ declare function createRelayClient(options: {
8455
8464
  budgets: {
8456
8465
  id: string;
8457
8466
  scope: "project" | "member";
8458
- period: "lifetime" | "day";
8467
+ period: "day" | "lifetime";
8459
8468
  limit: number;
8460
8469
  cost: number | {
8461
8470
  balance: string;
@@ -8699,6 +8708,7 @@ declare function createRelayClient(options: {
8699
8708
  } | undefined;
8700
8709
  })[];
8701
8710
  }>;
8711
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
8702
8712
  beginHandover: (id: string, input: z.input<typeof beginHandoverSchema>) => Promise<{
8703
8713
  status: "available";
8704
8714
  id: string;
@@ -8776,6 +8786,7 @@ declare function createRelayClient(options: {
8776
8786
  label: string;
8777
8787
  } | undefined;
8778
8788
  }>;
8789
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
8779
8790
  confirmHandover: (id: string, input: {
8780
8791
  actionId: string;
8781
8792
  handover: string;
@@ -8956,6 +8967,7 @@ declare function createRelayClient(options: {
8956
8967
  release?: string | undefined;
8957
8968
  } | undefined;
8958
8969
  }>;
8970
+ /** @deprecated The participant API accepts only member sessions and rejects this staff call. Use the management API with a management key instead. */
8959
8971
  decide: (id: string, input: {
8960
8972
  actionId: string;
8961
8973
  generation: number;
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ import {
51
51
  walletChallengeSchema,
52
52
  walletConnectionSchema,
53
53
  walletProofSchema
54
- } from "./chunk-Y6H4HDQT.js";
54
+ } from "./chunk-ATLYA27Y.js";
55
55
  import {
56
56
  defineLeaderboard,
57
57
  defineReferral,
@@ -1,13 +1,17 @@
1
1
  /**
2
2
  * Server-only proxy: browser cookies stay on the participant origin.
3
- * Point upstream at a participant deployment with trusted server scope configured.
4
- * Browser Authorization and organization/project/environment selectors are discarded.
5
- * Set hosted: true for the shared API to resolve a registered preview/staging origin.
6
- * This does not provide backend identity exchange.
3
+ * The shared API resolves the app's origin to its registered preview or staging
4
+ * project. Browser Authorization and organization/project/environment
5
+ * selectors are discarded. This does not provide backend identity exchange.
7
6
  */
8
7
  declare function proxyParticipant(request: Request, upstream: {
9
8
  baseUrl: string;
10
9
  fetch: typeof fetch;
10
+ /**
11
+ * Send the app origin for the API to resolve. Defaults to true; the API
12
+ * refuses participant requests that no registered app addresses. Only an
13
+ * upstream that already applies a project scope passes false.
14
+ */
11
15
  hosted?: boolean;
12
16
  }): Promise<Response>;
13
17
  /** Use only in an app server route. authenticate must verify the app's own session. */
@@ -35,7 +35,8 @@ async function proxyParticipant(request, upstream) {
35
35
  const value = request.headers.get(name);
36
36
  if (value) headers.set(name, value);
37
37
  }
38
- if (upstream.hosted) headers.set("X-Relay-App-Origin", incoming.origin);
38
+ if (upstream.hosted ?? true)
39
+ headers.set("X-Relay-App-Origin", incoming.origin);
39
40
  const send = upstream.fetch;
40
41
  const response = await send(target, {
41
42
  method: request.method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domino-sdk/relay",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {