@itm-studio/partner-sdk 0.2.8 → 0.2.9
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/README.md +19 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +50 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -25
- package/dist/index.mjs.map +1 -1
- package/dist/unsupported-runtime.d.mts +2 -0
- package/dist/unsupported-runtime.d.ts +2 -0
- package/dist/unsupported-runtime.js +9 -0
- package/dist/unsupported-runtime.js.map +1 -0
- package/dist/unsupported-runtime.mjs +7 -0
- package/dist/unsupported-runtime.mjs.map +1 -0
- package/package.json +15 -3
- package/schema/partner.graphql +8 -0
package/README.md
CHANGED
|
@@ -67,6 +67,19 @@ The token is sent as the `x-partner-api-key` header on every request. Your brand
|
|
|
67
67
|
|
|
68
68
|
Keep the partner token on your server. Do not expose it from browser code or client-side mobile code.
|
|
69
69
|
|
|
70
|
+
The SDK enforces this boundary and supports Node.js server runtimes only. Imports
|
|
71
|
+
from browsers, React Native, Web or Service Workers, edge runtimes, and Electron
|
|
72
|
+
processes fail before an authenticated client can be created. Send client-side
|
|
73
|
+
requests to your own Node backend, then return only the data the client needs.
|
|
74
|
+
|
|
75
|
+
In Next.js, also mark the module that reads the token as server-only so an
|
|
76
|
+
accidental Client Component import fails during the application build:
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
import "server-only";
|
|
80
|
+
import { createITMPartnerClient } from "@itm-studio/partner-sdk";
|
|
81
|
+
```
|
|
82
|
+
|
|
70
83
|
For request-scoped mutations such as partner brand subscriptions, create the client inside the incoming request and forward `x-forwarded-for` and `user-agent` so the backend can enrich compliance metadata when those fields are omitted from `input.compliance`.
|
|
71
84
|
|
|
72
85
|
```typescript
|
|
@@ -264,6 +277,7 @@ const { getPartnerMomentsForBrand } = await itm.query({
|
|
|
264
277
|
take: 20, // items per page (default: 50, omit to use default)
|
|
265
278
|
cursor: nextCursor, // from previous response
|
|
266
279
|
status: "UPCOMING", // UPCOMING | LIVE | ENDED
|
|
280
|
+
filters: { includePrivate: true }, // include private moments owned by your brand
|
|
267
281
|
sortOrder: "ASC", // ASC | DESC by start date (default: DESC)
|
|
268
282
|
},
|
|
269
283
|
moments: { uid: true, name: true, startDate: true },
|
|
@@ -274,6 +288,11 @@ const { getPartnerMomentsForBrand } = await itm.query({
|
|
|
274
288
|
});
|
|
275
289
|
```
|
|
276
290
|
|
|
291
|
+
By default, only public moments are returned. Set
|
|
292
|
+
`filters.includePrivate` to `true` to return both public and private moments
|
|
293
|
+
owned by the brand associated with the partner token. Omitting `filters`, or
|
|
294
|
+
setting `includePrivate` to `false`, preserves the public-only behavior.
|
|
295
|
+
|
|
277
296
|
### `getPartnerDrops`
|
|
278
297
|
|
|
279
298
|
Get paginated brand drops for the brand associated with your partner token.
|
package/dist/index.d.mts
CHANGED
|
@@ -1302,6 +1302,10 @@ interface MomentLineupResponseResultGenqlSelection {
|
|
|
1302
1302
|
__typename?: boolean | number;
|
|
1303
1303
|
__scalar?: boolean | number;
|
|
1304
1304
|
}
|
|
1305
|
+
interface PartnerMomentsFiltersInput {
|
|
1306
|
+
/** When true, includes private moments owned by the authenticated brand. Default: false. */
|
|
1307
|
+
includePrivate?: (Scalars['Boolean'] | null);
|
|
1308
|
+
}
|
|
1305
1309
|
interface QueryGenqlSelection {
|
|
1306
1310
|
/** Get details for the brand associated with the partner token. */
|
|
1307
1311
|
getPartnerBrand?: PartnerBrandGenqlSelection;
|
|
@@ -1312,6 +1316,7 @@ interface QueryGenqlSelection {
|
|
|
1312
1316
|
cursor?: (Scalars['String'] | null);
|
|
1313
1317
|
take?: (Scalars['Int'] | null);
|
|
1314
1318
|
status?: (MomentStatus | null);
|
|
1319
|
+
filters?: (PartnerMomentsFiltersInput | null);
|
|
1315
1320
|
/** Sort order for moments by start date (default: DESC - newest to oldest) */
|
|
1316
1321
|
sortOrder?: (MomentSortOrder | null);
|
|
1317
1322
|
};
|
|
@@ -1893,4 +1898,4 @@ type ITMPartnerClient = Client;
|
|
|
1893
1898
|
*/
|
|
1894
1899
|
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
1895
1900
|
|
|
1896
|
-
export { type ApplyDynamicPricingInput, type BrandDrop, type BrandDropCtaType, type BrandDropMusicLink, type BrandSubscription, type CreateMomentOnlineConfigInput, type CreatePartnerBrandSubscriptionInput, type CreatePartnerBrandSubscriptionResponse, type CreatePartnerMomentInput, type CreatePartnerTicketTierInput, type Currency, DEFAULT_API_URL, type Dimensions, type DimensionsInput, type DynamicPricingActorType, type DynamicPricingAdmissionWindow, type DynamicPricingBatch, type DynamicPricingBatchEvent, type DynamicPricingBatchEventType, type DynamicPricingBatchItem, type DynamicPricingBatchItemStatus, type DynamicPricingBatchStatus, type DynamicPricingContext, type DynamicPricingExecutionMode, type DynamicPricingInventoryGuardInput, type DynamicPricingInventoryGuardMode, type DynamicPricingInventoryMetric, type DynamicPricingMomentInput, type DynamicPricingTierContext, type DynamicPricingTierUpdateInput, type Echo, type EchoMediaAsset, type EchoType, type EditPartnerTicketTiersForMomentInput, type EventImportPlatform, type GetBrandEchoesForUserResponse, type GetMomentLineupsResponse, type GetPartnerCustomersResponse, type GetPartnerDropsResponse, type GetPartnerTicketTiersForMomentInput, type GetPartnerTicketTiersForMomentResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type ITMPartnerHeaders, type ITMPartnerHeadersObject, type MediaAsset, type MediaAssetUploadUrl, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, type MomentDiscountCodeUsage, type MomentDynamicPricingPolicy, type MomentDynamicPricingTierRule, type MomentLineup, type MomentLineupDisplayLabel, type MomentLineupResponseResult, type MomentLineupStatus, type MomentLineupType, type MomentOnlineProvider, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type MusicReleaseType, type Mutation, type PartnerBrand, type PartnerCustomer, type PartnerMomentAttendanceCount, type PartnerMomentAttendanceLookupInput, type PartnerMomentAttendanceStats, type PartnerMomentGuestlistAttendance, type PartnerMomentGuestlistLabelAttendance, type PartnerMomentStats, type PartnerMomentTicketAttendance, type PartnerMomentTicketTierAttendance, type PartnerTicketTier, type PartnerTicketTierUpdateInput, type Payment, type PaymentStatus, type PostSubscriptionEmailInput, type PostSubscriptionMessageInput, type PostSubscriptionPushInput, type PostSubscriptionSmsInput, type PublicMomentLineupInfo, type Query, type RespondToMomentLineupInput, type SubscriptionComplianceInput, type ThirdPartyEchoType, type Ticket, type TicketAdmissionWindowSource, type TicketAttendanceMode, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, type VenueInput, type VerifyPartnerBrandSubscriptionInput, createITMPartnerClient, everything, generateMutationOp, generateQueryOp };
|
|
1901
|
+
export { type ApplyDynamicPricingInput, type BrandDrop, type BrandDropCtaType, type BrandDropMusicLink, type BrandSubscription, type CreateMomentOnlineConfigInput, type CreatePartnerBrandSubscriptionInput, type CreatePartnerBrandSubscriptionResponse, type CreatePartnerMomentInput, type CreatePartnerTicketTierInput, type Currency, DEFAULT_API_URL, type Dimensions, type DimensionsInput, type DynamicPricingActorType, type DynamicPricingAdmissionWindow, type DynamicPricingBatch, type DynamicPricingBatchEvent, type DynamicPricingBatchEventType, type DynamicPricingBatchItem, type DynamicPricingBatchItemStatus, type DynamicPricingBatchStatus, type DynamicPricingContext, type DynamicPricingExecutionMode, type DynamicPricingInventoryGuardInput, type DynamicPricingInventoryGuardMode, type DynamicPricingInventoryMetric, type DynamicPricingMomentInput, type DynamicPricingTierContext, type DynamicPricingTierUpdateInput, type Echo, type EchoMediaAsset, type EchoType, type EditPartnerTicketTiersForMomentInput, type EventImportPlatform, type GetBrandEchoesForUserResponse, type GetMomentLineupsResponse, type GetPartnerCustomersResponse, type GetPartnerDropsResponse, type GetPartnerTicketTiersForMomentInput, type GetPartnerTicketTiersForMomentResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type ITMPartnerHeaders, type ITMPartnerHeadersObject, type MediaAsset, type MediaAssetUploadUrl, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, type MomentDiscountCodeUsage, type MomentDynamicPricingPolicy, type MomentDynamicPricingTierRule, type MomentLineup, type MomentLineupDisplayLabel, type MomentLineupResponseResult, type MomentLineupStatus, type MomentLineupType, type MomentOnlineProvider, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type MusicReleaseType, type Mutation, type PartnerBrand, type PartnerCustomer, type PartnerMomentAttendanceCount, type PartnerMomentAttendanceLookupInput, type PartnerMomentAttendanceStats, type PartnerMomentGuestlistAttendance, type PartnerMomentGuestlistLabelAttendance, type PartnerMomentStats, type PartnerMomentTicketAttendance, type PartnerMomentTicketTierAttendance, type PartnerMomentsFiltersInput, type PartnerTicketTier, type PartnerTicketTierUpdateInput, type Payment, type PaymentStatus, type PostSubscriptionEmailInput, type PostSubscriptionMessageInput, type PostSubscriptionPushInput, type PostSubscriptionSmsInput, type PublicMomentLineupInfo, type Query, type RespondToMomentLineupInput, type SubscriptionComplianceInput, type ThirdPartyEchoType, type Ticket, type TicketAdmissionWindowSource, type TicketAttendanceMode, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, type VenueInput, type VerifyPartnerBrandSubscriptionInput, createITMPartnerClient, everything, generateMutationOp, generateQueryOp };
|
package/dist/index.d.ts
CHANGED
|
@@ -1302,6 +1302,10 @@ interface MomentLineupResponseResultGenqlSelection {
|
|
|
1302
1302
|
__typename?: boolean | number;
|
|
1303
1303
|
__scalar?: boolean | number;
|
|
1304
1304
|
}
|
|
1305
|
+
interface PartnerMomentsFiltersInput {
|
|
1306
|
+
/** When true, includes private moments owned by the authenticated brand. Default: false. */
|
|
1307
|
+
includePrivate?: (Scalars['Boolean'] | null);
|
|
1308
|
+
}
|
|
1305
1309
|
interface QueryGenqlSelection {
|
|
1306
1310
|
/** Get details for the brand associated with the partner token. */
|
|
1307
1311
|
getPartnerBrand?: PartnerBrandGenqlSelection;
|
|
@@ -1312,6 +1316,7 @@ interface QueryGenqlSelection {
|
|
|
1312
1316
|
cursor?: (Scalars['String'] | null);
|
|
1313
1317
|
take?: (Scalars['Int'] | null);
|
|
1314
1318
|
status?: (MomentStatus | null);
|
|
1319
|
+
filters?: (PartnerMomentsFiltersInput | null);
|
|
1315
1320
|
/** Sort order for moments by start date (default: DESC - newest to oldest) */
|
|
1316
1321
|
sortOrder?: (MomentSortOrder | null);
|
|
1317
1322
|
};
|
|
@@ -1893,4 +1898,4 @@ type ITMPartnerClient = Client;
|
|
|
1893
1898
|
*/
|
|
1894
1899
|
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
1895
1900
|
|
|
1896
|
-
export { type ApplyDynamicPricingInput, type BrandDrop, type BrandDropCtaType, type BrandDropMusicLink, type BrandSubscription, type CreateMomentOnlineConfigInput, type CreatePartnerBrandSubscriptionInput, type CreatePartnerBrandSubscriptionResponse, type CreatePartnerMomentInput, type CreatePartnerTicketTierInput, type Currency, DEFAULT_API_URL, type Dimensions, type DimensionsInput, type DynamicPricingActorType, type DynamicPricingAdmissionWindow, type DynamicPricingBatch, type DynamicPricingBatchEvent, type DynamicPricingBatchEventType, type DynamicPricingBatchItem, type DynamicPricingBatchItemStatus, type DynamicPricingBatchStatus, type DynamicPricingContext, type DynamicPricingExecutionMode, type DynamicPricingInventoryGuardInput, type DynamicPricingInventoryGuardMode, type DynamicPricingInventoryMetric, type DynamicPricingMomentInput, type DynamicPricingTierContext, type DynamicPricingTierUpdateInput, type Echo, type EchoMediaAsset, type EchoType, type EditPartnerTicketTiersForMomentInput, type EventImportPlatform, type GetBrandEchoesForUserResponse, type GetMomentLineupsResponse, type GetPartnerCustomersResponse, type GetPartnerDropsResponse, type GetPartnerTicketTiersForMomentInput, type GetPartnerTicketTiersForMomentResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type ITMPartnerHeaders, type ITMPartnerHeadersObject, type MediaAsset, type MediaAssetUploadUrl, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, type MomentDiscountCodeUsage, type MomentDynamicPricingPolicy, type MomentDynamicPricingTierRule, type MomentLineup, type MomentLineupDisplayLabel, type MomentLineupResponseResult, type MomentLineupStatus, type MomentLineupType, type MomentOnlineProvider, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type MusicReleaseType, type Mutation, type PartnerBrand, type PartnerCustomer, type PartnerMomentAttendanceCount, type PartnerMomentAttendanceLookupInput, type PartnerMomentAttendanceStats, type PartnerMomentGuestlistAttendance, type PartnerMomentGuestlistLabelAttendance, type PartnerMomentStats, type PartnerMomentTicketAttendance, type PartnerMomentTicketTierAttendance, type PartnerTicketTier, type PartnerTicketTierUpdateInput, type Payment, type PaymentStatus, type PostSubscriptionEmailInput, type PostSubscriptionMessageInput, type PostSubscriptionPushInput, type PostSubscriptionSmsInput, type PublicMomentLineupInfo, type Query, type RespondToMomentLineupInput, type SubscriptionComplianceInput, type ThirdPartyEchoType, type Ticket, type TicketAdmissionWindowSource, type TicketAttendanceMode, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, type VenueInput, type VerifyPartnerBrandSubscriptionInput, createITMPartnerClient, everything, generateMutationOp, generateQueryOp };
|
|
1901
|
+
export { type ApplyDynamicPricingInput, type BrandDrop, type BrandDropCtaType, type BrandDropMusicLink, type BrandSubscription, type CreateMomentOnlineConfigInput, type CreatePartnerBrandSubscriptionInput, type CreatePartnerBrandSubscriptionResponse, type CreatePartnerMomentInput, type CreatePartnerTicketTierInput, type Currency, DEFAULT_API_URL, type Dimensions, type DimensionsInput, type DynamicPricingActorType, type DynamicPricingAdmissionWindow, type DynamicPricingBatch, type DynamicPricingBatchEvent, type DynamicPricingBatchEventType, type DynamicPricingBatchItem, type DynamicPricingBatchItemStatus, type DynamicPricingBatchStatus, type DynamicPricingContext, type DynamicPricingExecutionMode, type DynamicPricingInventoryGuardInput, type DynamicPricingInventoryGuardMode, type DynamicPricingInventoryMetric, type DynamicPricingMomentInput, type DynamicPricingTierContext, type DynamicPricingTierUpdateInput, type Echo, type EchoMediaAsset, type EchoType, type EditPartnerTicketTiersForMomentInput, type EventImportPlatform, type GetBrandEchoesForUserResponse, type GetMomentLineupsResponse, type GetPartnerCustomersResponse, type GetPartnerDropsResponse, type GetPartnerTicketTiersForMomentInput, type GetPartnerTicketTiersForMomentResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type ITMPartnerHeaders, type ITMPartnerHeadersObject, type MediaAsset, type MediaAssetUploadUrl, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, type MomentDiscountCodeUsage, type MomentDynamicPricingPolicy, type MomentDynamicPricingTierRule, type MomentLineup, type MomentLineupDisplayLabel, type MomentLineupResponseResult, type MomentLineupStatus, type MomentLineupType, type MomentOnlineProvider, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type MusicReleaseType, type Mutation, type PartnerBrand, type PartnerCustomer, type PartnerMomentAttendanceCount, type PartnerMomentAttendanceLookupInput, type PartnerMomentAttendanceStats, type PartnerMomentGuestlistAttendance, type PartnerMomentGuestlistLabelAttendance, type PartnerMomentStats, type PartnerMomentTicketAttendance, type PartnerMomentTicketTierAttendance, type PartnerMomentsFiltersInput, type PartnerTicketTier, type PartnerTicketTierUpdateInput, type Payment, type PaymentStatus, type PostSubscriptionEmailInput, type PostSubscriptionMessageInput, type PostSubscriptionPushInput, type PostSubscriptionSmsInput, type PublicMomentLineupInfo, type Query, type RespondToMomentLineupInput, type SubscriptionComplianceInput, type ThirdPartyEchoType, type Ticket, type TicketAdmissionWindowSource, type TicketAttendanceMode, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, type VenueInput, type VerifyPartnerBrandSubscriptionInput, createITMPartnerClient, everything, generateMutationOp, generateQueryOp };
|
package/dist/index.js
CHANGED
|
@@ -1388,10 +1388,10 @@ var types_default = {
|
|
|
1388
1388
|
20
|
|
1389
1389
|
],
|
|
1390
1390
|
"coverImage": [
|
|
1391
|
-
|
|
1391
|
+
103
|
|
1392
1392
|
],
|
|
1393
1393
|
"coverImageMobile": [
|
|
1394
|
-
|
|
1394
|
+
103
|
|
1395
1395
|
],
|
|
1396
1396
|
"isActive": [
|
|
1397
1397
|
25
|
|
@@ -1988,6 +1988,14 @@ var types_default = {
|
|
|
1988
1988
|
20
|
|
1989
1989
|
]
|
|
1990
1990
|
},
|
|
1991
|
+
"PartnerMomentsFiltersInput": {
|
|
1992
|
+
"includePrivate": [
|
|
1993
|
+
25
|
|
1994
|
+
],
|
|
1995
|
+
"__typename": [
|
|
1996
|
+
20
|
|
1997
|
+
]
|
|
1998
|
+
},
|
|
1991
1999
|
"Query": {
|
|
1992
2000
|
"getPartnerBrand": [
|
|
1993
2001
|
21
|
|
@@ -2004,6 +2012,9 @@ var types_default = {
|
|
|
2004
2012
|
"status": [
|
|
2005
2013
|
2
|
|
2006
2014
|
],
|
|
2015
|
+
"filters": [
|
|
2016
|
+
80
|
|
2017
|
+
],
|
|
2007
2018
|
"sortOrder": [
|
|
2008
2019
|
3
|
|
2009
2020
|
]
|
|
@@ -2116,7 +2127,7 @@ var types_default = {
|
|
|
2116
2127
|
60,
|
|
2117
2128
|
{
|
|
2118
2129
|
"input": [
|
|
2119
|
-
|
|
2130
|
+
87,
|
|
2120
2131
|
"GetPartnerTicketTiersForMomentInput!"
|
|
2121
2132
|
]
|
|
2122
2133
|
}
|
|
@@ -2125,7 +2136,7 @@ var types_default = {
|
|
|
2125
2136
|
73,
|
|
2126
2137
|
{
|
|
2127
2138
|
"input": [
|
|
2128
|
-
|
|
2139
|
+
90,
|
|
2129
2140
|
"DynamicPricingMomentInput!"
|
|
2130
2141
|
]
|
|
2131
2142
|
}
|
|
@@ -2282,10 +2293,10 @@ var types_default = {
|
|
|
2282
2293
|
20
|
|
2283
2294
|
],
|
|
2284
2295
|
"venue": [
|
|
2285
|
-
|
|
2296
|
+
83
|
|
2286
2297
|
],
|
|
2287
2298
|
"onlineConfig": [
|
|
2288
|
-
|
|
2299
|
+
85
|
|
2289
2300
|
],
|
|
2290
2301
|
"isPrivate": [
|
|
2291
2302
|
25
|
|
@@ -2300,7 +2311,7 @@ var types_default = {
|
|
|
2300
2311
|
10
|
|
2301
2312
|
],
|
|
2302
2313
|
"ticketTiers": [
|
|
2303
|
-
|
|
2314
|
+
84
|
|
2304
2315
|
],
|
|
2305
2316
|
"__typename": [
|
|
2306
2317
|
20
|
|
@@ -2408,7 +2419,7 @@ var types_default = {
|
|
|
2408
2419
|
20
|
|
2409
2420
|
],
|
|
2410
2421
|
"updates": [
|
|
2411
|
-
|
|
2422
|
+
88
|
|
2412
2423
|
],
|
|
2413
2424
|
"__typename": [
|
|
2414
2425
|
20
|
|
@@ -2439,7 +2450,7 @@ var types_default = {
|
|
|
2439
2450
|
20
|
|
2440
2451
|
],
|
|
2441
2452
|
"inventoryGuard": [
|
|
2442
|
-
|
|
2453
|
+
92
|
|
2443
2454
|
],
|
|
2444
2455
|
"externalSignals": [
|
|
2445
2456
|
1
|
|
@@ -2497,7 +2508,7 @@ var types_default = {
|
|
|
2497
2508
|
1
|
|
2498
2509
|
],
|
|
2499
2510
|
"updates": [
|
|
2500
|
-
|
|
2511
|
+
91
|
|
2501
2512
|
],
|
|
2502
2513
|
"__typename": [
|
|
2503
2514
|
20
|
|
@@ -2617,13 +2628,13 @@ var types_default = {
|
|
|
2617
2628
|
},
|
|
2618
2629
|
"PostSubscriptionMessageInput": {
|
|
2619
2630
|
"sms": [
|
|
2620
|
-
|
|
2631
|
+
96
|
|
2621
2632
|
],
|
|
2622
2633
|
"email": [
|
|
2623
|
-
|
|
2634
|
+
97
|
|
2624
2635
|
],
|
|
2625
2636
|
"push": [
|
|
2626
|
-
|
|
2637
|
+
98
|
|
2627
2638
|
],
|
|
2628
2639
|
"__typename": [
|
|
2629
2640
|
20
|
|
@@ -2631,7 +2642,7 @@ var types_default = {
|
|
|
2631
2642
|
},
|
|
2632
2643
|
"CreatePartnerBrandSubscriptionInput": {
|
|
2633
2644
|
"compliance": [
|
|
2634
|
-
|
|
2645
|
+
95
|
|
2635
2646
|
],
|
|
2636
2647
|
"email": [
|
|
2637
2648
|
20
|
|
@@ -2649,7 +2660,7 @@ var types_default = {
|
|
|
2649
2660
|
25
|
|
2650
2661
|
],
|
|
2651
2662
|
"postSubscriptionMessage": [
|
|
2652
|
-
|
|
2663
|
+
99
|
|
2653
2664
|
],
|
|
2654
2665
|
"__typename": [
|
|
2655
2666
|
20
|
|
@@ -2728,7 +2739,7 @@ var types_default = {
|
|
|
2728
2739
|
},
|
|
2729
2740
|
"Mutation": {
|
|
2730
2741
|
"getPartnerUploadUrl": [
|
|
2731
|
-
|
|
2742
|
+
102,
|
|
2732
2743
|
{
|
|
2733
2744
|
"filename": [
|
|
2734
2745
|
20,
|
|
@@ -2741,7 +2752,7 @@ var types_default = {
|
|
|
2741
2752
|
}
|
|
2742
2753
|
],
|
|
2743
2754
|
"createPartnerMediaAsset": [
|
|
2744
|
-
|
|
2755
|
+
103,
|
|
2745
2756
|
{
|
|
2746
2757
|
"mimetype": [
|
|
2747
2758
|
20,
|
|
@@ -2752,16 +2763,16 @@ var types_default = {
|
|
|
2752
2763
|
"String!"
|
|
2753
2764
|
],
|
|
2754
2765
|
"dimensions": [
|
|
2755
|
-
|
|
2766
|
+
82,
|
|
2756
2767
|
"DimensionsInput!"
|
|
2757
2768
|
]
|
|
2758
2769
|
}
|
|
2759
2770
|
],
|
|
2760
2771
|
"createPartnerBrandSubscription": [
|
|
2761
|
-
|
|
2772
|
+
104,
|
|
2762
2773
|
{
|
|
2763
2774
|
"input": [
|
|
2764
|
-
|
|
2775
|
+
100,
|
|
2765
2776
|
"CreatePartnerBrandSubscriptionInput!"
|
|
2766
2777
|
]
|
|
2767
2778
|
}
|
|
@@ -2770,7 +2781,7 @@ var types_default = {
|
|
|
2770
2781
|
24,
|
|
2771
2782
|
{
|
|
2772
2783
|
"input": [
|
|
2773
|
-
|
|
2784
|
+
86,
|
|
2774
2785
|
"CreatePartnerMomentInput!"
|
|
2775
2786
|
]
|
|
2776
2787
|
}
|
|
@@ -2779,7 +2790,7 @@ var types_default = {
|
|
|
2779
2790
|
59,
|
|
2780
2791
|
{
|
|
2781
2792
|
"input": [
|
|
2782
|
-
|
|
2793
|
+
89,
|
|
2783
2794
|
"EditPartnerTicketTiersForMomentInput!"
|
|
2784
2795
|
]
|
|
2785
2796
|
}
|
|
@@ -2788,7 +2799,7 @@ var types_default = {
|
|
|
2788
2799
|
76,
|
|
2789
2800
|
{
|
|
2790
2801
|
"input": [
|
|
2791
|
-
|
|
2802
|
+
93,
|
|
2792
2803
|
"ApplyDynamicPricingInput!"
|
|
2793
2804
|
]
|
|
2794
2805
|
}
|
|
@@ -2797,7 +2808,7 @@ var types_default = {
|
|
|
2797
2808
|
77,
|
|
2798
2809
|
{
|
|
2799
2810
|
"input": [
|
|
2800
|
-
|
|
2811
|
+
101,
|
|
2801
2812
|
"VerifyPartnerBrandSubscriptionInput!"
|
|
2802
2813
|
]
|
|
2803
2814
|
}
|
|
@@ -2806,7 +2817,7 @@ var types_default = {
|
|
|
2806
2817
|
79,
|
|
2807
2818
|
{
|
|
2808
2819
|
"input": [
|
|
2809
|
-
|
|
2820
|
+
94,
|
|
2810
2821
|
"RespondToMomentLineupInput!"
|
|
2811
2822
|
]
|
|
2812
2823
|
}
|
|
@@ -2839,7 +2850,21 @@ var generateMutationOp = function(fields) {
|
|
|
2839
2850
|
return generateGraphqlOperation("mutation", typeMap.Mutation, fields);
|
|
2840
2851
|
};
|
|
2841
2852
|
|
|
2853
|
+
// src/runtime.ts
|
|
2854
|
+
var NODE_SERVER_ONLY_ERROR = "ITM Partner SDK is Node-server-only. Do not import it in browser, React Native, worker, edge, or Electron process code. Call it from a Node backend and return only the data the client needs.";
|
|
2855
|
+
function assertNodeServerRuntime(runtime = globalThis) {
|
|
2856
|
+
const runtimeProcess = runtime.process;
|
|
2857
|
+
const isNode = runtimeProcess?.release?.name === "node" && typeof runtimeProcess.versions?.node === "string";
|
|
2858
|
+
const isBrowserWindow = typeof runtime.window !== "undefined";
|
|
2859
|
+
const isReactNative = runtime.navigator?.product === "ReactNative";
|
|
2860
|
+
const isElectron = typeof runtimeProcess?.versions?.electron === "string" || typeof runtimeProcess?.type === "string";
|
|
2861
|
+
if (!isNode || isBrowserWindow || isReactNative || isElectron) {
|
|
2862
|
+
throw new Error(NODE_SERVER_ONLY_ERROR);
|
|
2863
|
+
}
|
|
2864
|
+
}
|
|
2865
|
+
|
|
2842
2866
|
// src/client.ts
|
|
2867
|
+
assertNodeServerRuntime();
|
|
2843
2868
|
var DEFAULT_API_URL = "https://itm-backend-production.up.railway.app/graphql";
|
|
2844
2869
|
function createITMPartnerClient(config) {
|
|
2845
2870
|
const { token, baseUrl, headers: extraHeaders } = config;
|