@itm-studio/partner-sdk 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +52 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/partner.graphql +12 -0
package/README.md
CHANGED
|
@@ -1879,3 +1879,9 @@ and brand ownership and records an audit entry. Partner-token callers must omit
|
|
|
1879
1879
|
both audit identifiers and retain their existing upload flow.
|
|
1880
1880
|
|
|
1881
1881
|
Deploy the backend media schema and migration before releasing this SDK contract.
|
|
1882
|
+
|
|
1883
|
+
### Automatic operator CC for Eve
|
|
1884
|
+
|
|
1885
|
+
Agent-session email callers first query `getPartnerAgentEmailContext { operatorCcEmail }`, show that address with every email draft, and include `operatorCcEmail` in `SendPartnerAgentEmailInput` after approval. The backend verifies it against the authenticated admin, snapshots it on the batch, and CCs that address on each message. When the operator is already the primary recipient, no duplicate CC is added. Read the approved snapshot through `BrandAgentEmailSendBatch.operatorCcEmail`. A changed operator address before queuing requires a revised draft and approval; queued retries retain the original address.
|
|
1886
|
+
|
|
1887
|
+
Partner API-key callers cannot query operator context or supply operator CC. Existing partner sends and the brand Reply-To address retain their existing behavior.
|
package/dist/index.d.mts
CHANGED
|
@@ -654,7 +654,12 @@ interface BrandAgentEmailSendMessage {
|
|
|
654
654
|
lastErrorMessage: (Scalars['String'] | null);
|
|
655
655
|
__typename: 'BrandAgentEmailSendMessage';
|
|
656
656
|
}
|
|
657
|
+
interface BrandAgentEmailContext {
|
|
658
|
+
operatorCcEmail: Scalars['String'];
|
|
659
|
+
__typename: 'BrandAgentEmailContext';
|
|
660
|
+
}
|
|
657
661
|
interface BrandAgentEmailSendBatch {
|
|
662
|
+
operatorCcEmail: (Scalars['String'] | null);
|
|
658
663
|
uid: Scalars['String'];
|
|
659
664
|
createdAt: Scalars['DateTime'];
|
|
660
665
|
status: BrandAgentEmailSendBatchStatus;
|
|
@@ -682,6 +687,8 @@ interface GetPartnerMediaAssetsResponse {
|
|
|
682
687
|
__typename: 'GetPartnerMediaAssetsResponse';
|
|
683
688
|
}
|
|
684
689
|
interface Query {
|
|
690
|
+
/** Get the authenticated agent operator email for the approval preview. Requires a brand-agent session with SEND_EMAIL; unavailable to partner API keys. */
|
|
691
|
+
getPartnerAgentEmailContext: BrandAgentEmailContext;
|
|
685
692
|
/** Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents. */
|
|
686
693
|
getPartnerMediaAssets: GetPartnerMediaAssetsResponse;
|
|
687
694
|
/** An active asset linked to the caller's brand; null when unavailable. READ_MEDIA for agents. */
|
|
@@ -1566,7 +1573,13 @@ interface BrandAgentEmailSendMessageGenqlSelection {
|
|
|
1566
1573
|
__typename?: boolean | number;
|
|
1567
1574
|
__scalar?: boolean | number;
|
|
1568
1575
|
}
|
|
1576
|
+
interface BrandAgentEmailContextGenqlSelection {
|
|
1577
|
+
operatorCcEmail?: boolean | number;
|
|
1578
|
+
__typename?: boolean | number;
|
|
1579
|
+
__scalar?: boolean | number;
|
|
1580
|
+
}
|
|
1569
1581
|
interface BrandAgentEmailSendBatchGenqlSelection {
|
|
1582
|
+
operatorCcEmail?: boolean | number;
|
|
1570
1583
|
uid?: boolean | number;
|
|
1571
1584
|
createdAt?: boolean | number;
|
|
1572
1585
|
status?: boolean | number;
|
|
@@ -1603,6 +1616,8 @@ interface GetPartnerMediaAssetsResponseGenqlSelection {
|
|
|
1603
1616
|
__scalar?: boolean | number;
|
|
1604
1617
|
}
|
|
1605
1618
|
interface QueryGenqlSelection {
|
|
1619
|
+
/** Get the authenticated agent operator email for the approval preview. Requires a brand-agent session with SEND_EMAIL; unavailable to partner API keys. */
|
|
1620
|
+
getPartnerAgentEmailContext?: BrandAgentEmailContextGenqlSelection;
|
|
1606
1621
|
/** Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents. */
|
|
1607
1622
|
getPartnerMediaAssets?: (GetPartnerMediaAssetsResponseGenqlSelection & {
|
|
1608
1623
|
__args: {
|
|
@@ -1790,6 +1805,8 @@ interface BrandAgentEmailMessageInput {
|
|
|
1790
1805
|
text: Scalars['String'];
|
|
1791
1806
|
}
|
|
1792
1807
|
interface SendPartnerAgentEmailInput {
|
|
1808
|
+
/** Required for agent callers: operator CC from getPartnerAgentEmailContext, shown in the approved draft. Partner callers cannot set this. */
|
|
1809
|
+
operatorCcEmail?: (Scalars['String'] | null);
|
|
1793
1810
|
/** Stable business idempotency key for this logical batch. */
|
|
1794
1811
|
idempotencyKey: Scalars['String'];
|
|
1795
1812
|
/** One to ten personalized, single-recipient plain-text emails. */
|
package/dist/index.d.ts
CHANGED
|
@@ -654,7 +654,12 @@ interface BrandAgentEmailSendMessage {
|
|
|
654
654
|
lastErrorMessage: (Scalars['String'] | null);
|
|
655
655
|
__typename: 'BrandAgentEmailSendMessage';
|
|
656
656
|
}
|
|
657
|
+
interface BrandAgentEmailContext {
|
|
658
|
+
operatorCcEmail: Scalars['String'];
|
|
659
|
+
__typename: 'BrandAgentEmailContext';
|
|
660
|
+
}
|
|
657
661
|
interface BrandAgentEmailSendBatch {
|
|
662
|
+
operatorCcEmail: (Scalars['String'] | null);
|
|
658
663
|
uid: Scalars['String'];
|
|
659
664
|
createdAt: Scalars['DateTime'];
|
|
660
665
|
status: BrandAgentEmailSendBatchStatus;
|
|
@@ -682,6 +687,8 @@ interface GetPartnerMediaAssetsResponse {
|
|
|
682
687
|
__typename: 'GetPartnerMediaAssetsResponse';
|
|
683
688
|
}
|
|
684
689
|
interface Query {
|
|
690
|
+
/** Get the authenticated agent operator email for the approval preview. Requires a brand-agent session with SEND_EMAIL; unavailable to partner API keys. */
|
|
691
|
+
getPartnerAgentEmailContext: BrandAgentEmailContext;
|
|
685
692
|
/** Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents. */
|
|
686
693
|
getPartnerMediaAssets: GetPartnerMediaAssetsResponse;
|
|
687
694
|
/** An active asset linked to the caller's brand; null when unavailable. READ_MEDIA for agents. */
|
|
@@ -1566,7 +1573,13 @@ interface BrandAgentEmailSendMessageGenqlSelection {
|
|
|
1566
1573
|
__typename?: boolean | number;
|
|
1567
1574
|
__scalar?: boolean | number;
|
|
1568
1575
|
}
|
|
1576
|
+
interface BrandAgentEmailContextGenqlSelection {
|
|
1577
|
+
operatorCcEmail?: boolean | number;
|
|
1578
|
+
__typename?: boolean | number;
|
|
1579
|
+
__scalar?: boolean | number;
|
|
1580
|
+
}
|
|
1569
1581
|
interface BrandAgentEmailSendBatchGenqlSelection {
|
|
1582
|
+
operatorCcEmail?: boolean | number;
|
|
1570
1583
|
uid?: boolean | number;
|
|
1571
1584
|
createdAt?: boolean | number;
|
|
1572
1585
|
status?: boolean | number;
|
|
@@ -1603,6 +1616,8 @@ interface GetPartnerMediaAssetsResponseGenqlSelection {
|
|
|
1603
1616
|
__scalar?: boolean | number;
|
|
1604
1617
|
}
|
|
1605
1618
|
interface QueryGenqlSelection {
|
|
1619
|
+
/** Get the authenticated agent operator email for the approval preview. Requires a brand-agent session with SEND_EMAIL; unavailable to partner API keys. */
|
|
1620
|
+
getPartnerAgentEmailContext?: BrandAgentEmailContextGenqlSelection;
|
|
1606
1621
|
/** Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents. */
|
|
1607
1622
|
getPartnerMediaAssets?: (GetPartnerMediaAssetsResponseGenqlSelection & {
|
|
1608
1623
|
__args: {
|
|
@@ -1790,6 +1805,8 @@ interface BrandAgentEmailMessageInput {
|
|
|
1790
1805
|
text: Scalars['String'];
|
|
1791
1806
|
}
|
|
1792
1807
|
interface SendPartnerAgentEmailInput {
|
|
1808
|
+
/** Required for agent callers: operator CC from getPartnerAgentEmailContext, shown in the approved draft. Partner callers cannot set this. */
|
|
1809
|
+
operatorCcEmail?: (Scalars['String'] | null);
|
|
1793
1810
|
/** Stable business idempotency key for this logical batch. */
|
|
1794
1811
|
idempotencyKey: Scalars['String'];
|
|
1795
1812
|
/** One to ten personalized, single-recipient plain-text emails. */
|
package/dist/index.js
CHANGED
|
@@ -1547,10 +1547,10 @@ var types_default = {
|
|
|
1547
1547
|
27
|
|
1548
1548
|
],
|
|
1549
1549
|
"coverImage": [
|
|
1550
|
-
|
|
1550
|
+
127
|
|
1551
1551
|
],
|
|
1552
1552
|
"coverImageMobile": [
|
|
1553
|
-
|
|
1553
|
+
127
|
|
1554
1554
|
],
|
|
1555
1555
|
"isActive": [
|
|
1556
1556
|
33
|
|
@@ -2324,7 +2324,18 @@ var types_default = {
|
|
|
2324
2324
|
27
|
|
2325
2325
|
]
|
|
2326
2326
|
},
|
|
2327
|
+
"BrandAgentEmailContext": {
|
|
2328
|
+
"operatorCcEmail": [
|
|
2329
|
+
27
|
|
2330
|
+
],
|
|
2331
|
+
"__typename": [
|
|
2332
|
+
27
|
|
2333
|
+
]
|
|
2334
|
+
},
|
|
2327
2335
|
"BrandAgentEmailSendBatch": {
|
|
2336
|
+
"operatorCcEmail": [
|
|
2337
|
+
27
|
|
2338
|
+
],
|
|
2328
2339
|
"uid": [
|
|
2329
2340
|
27
|
|
2330
2341
|
],
|
|
@@ -2380,7 +2391,7 @@ var types_default = {
|
|
|
2380
2391
|
},
|
|
2381
2392
|
"GetPartnerMediaAssetsResponse": {
|
|
2382
2393
|
"mediaAssets": [
|
|
2383
|
-
|
|
2394
|
+
127
|
|
2384
2395
|
],
|
|
2385
2396
|
"totalCount": [
|
|
2386
2397
|
36
|
|
@@ -2396,17 +2407,20 @@ var types_default = {
|
|
|
2396
2407
|
]
|
|
2397
2408
|
},
|
|
2398
2409
|
"Query": {
|
|
2410
|
+
"getPartnerAgentEmailContext": [
|
|
2411
|
+
98
|
|
2412
|
+
],
|
|
2399
2413
|
"getPartnerMediaAssets": [
|
|
2400
|
-
|
|
2414
|
+
102,
|
|
2401
2415
|
{
|
|
2402
2416
|
"input": [
|
|
2403
|
-
|
|
2417
|
+
101,
|
|
2404
2418
|
"GetPartnerMediaAssetsInput!"
|
|
2405
2419
|
]
|
|
2406
2420
|
}
|
|
2407
2421
|
],
|
|
2408
2422
|
"getPartnerMediaAsset": [
|
|
2409
|
-
|
|
2423
|
+
127,
|
|
2410
2424
|
{
|
|
2411
2425
|
"uid": [
|
|
2412
2426
|
27,
|
|
@@ -2418,7 +2432,7 @@ var types_default = {
|
|
|
2418
2432
|
28
|
|
2419
2433
|
],
|
|
2420
2434
|
"getPartnerAgentEmailBatch": [
|
|
2421
|
-
|
|
2435
|
+
99,
|
|
2422
2436
|
{
|
|
2423
2437
|
"batchUid": [
|
|
2424
2438
|
27,
|
|
@@ -2427,7 +2441,7 @@ var types_default = {
|
|
|
2427
2441
|
}
|
|
2428
2442
|
],
|
|
2429
2443
|
"getAgentThreadSeed": [
|
|
2430
|
-
|
|
2444
|
+
100
|
|
2431
2445
|
],
|
|
2432
2446
|
"getPartnerMomentsForBrand": [
|
|
2433
2447
|
65,
|
|
@@ -2564,7 +2578,7 @@ var types_default = {
|
|
|
2564
2578
|
73,
|
|
2565
2579
|
{
|
|
2566
2580
|
"input": [
|
|
2567
|
-
|
|
2581
|
+
111,
|
|
2568
2582
|
"GetPartnerTicketTiersForMomentInput!"
|
|
2569
2583
|
]
|
|
2570
2584
|
}
|
|
@@ -2573,7 +2587,7 @@ var types_default = {
|
|
|
2573
2587
|
86,
|
|
2574
2588
|
{
|
|
2575
2589
|
"input": [
|
|
2576
|
-
|
|
2590
|
+
114,
|
|
2577
2591
|
"DynamicPricingMomentInput!"
|
|
2578
2592
|
]
|
|
2579
2593
|
}
|
|
@@ -2644,11 +2658,14 @@ var types_default = {
|
|
|
2644
2658
|
]
|
|
2645
2659
|
},
|
|
2646
2660
|
"SendPartnerAgentEmailInput": {
|
|
2661
|
+
"operatorCcEmail": [
|
|
2662
|
+
27
|
|
2663
|
+
],
|
|
2647
2664
|
"idempotencyKey": [
|
|
2648
2665
|
27
|
|
2649
2666
|
],
|
|
2650
2667
|
"messages": [
|
|
2651
|
-
|
|
2668
|
+
105
|
|
2652
2669
|
],
|
|
2653
2670
|
"toolCallId": [
|
|
2654
2671
|
27
|
|
@@ -2758,10 +2775,10 @@ var types_default = {
|
|
|
2758
2775
|
27
|
|
2759
2776
|
],
|
|
2760
2777
|
"venue": [
|
|
2761
|
-
|
|
2778
|
+
107
|
|
2762
2779
|
],
|
|
2763
2780
|
"onlineConfig": [
|
|
2764
|
-
|
|
2781
|
+
109
|
|
2765
2782
|
],
|
|
2766
2783
|
"isPrivate": [
|
|
2767
2784
|
33
|
|
@@ -2776,7 +2793,7 @@ var types_default = {
|
|
|
2776
2793
|
16
|
|
2777
2794
|
],
|
|
2778
2795
|
"ticketTiers": [
|
|
2779
|
-
|
|
2796
|
+
108
|
|
2780
2797
|
],
|
|
2781
2798
|
"idempotencyKey": [
|
|
2782
2799
|
27
|
|
@@ -2890,7 +2907,7 @@ var types_default = {
|
|
|
2890
2907
|
27
|
|
2891
2908
|
],
|
|
2892
2909
|
"updates": [
|
|
2893
|
-
|
|
2910
|
+
112
|
|
2894
2911
|
],
|
|
2895
2912
|
"__typename": [
|
|
2896
2913
|
27
|
|
@@ -2921,7 +2938,7 @@ var types_default = {
|
|
|
2921
2938
|
27
|
|
2922
2939
|
],
|
|
2923
2940
|
"inventoryGuard": [
|
|
2924
|
-
|
|
2941
|
+
116
|
|
2925
2942
|
],
|
|
2926
2943
|
"externalSignals": [
|
|
2927
2944
|
1
|
|
@@ -2979,7 +2996,7 @@ var types_default = {
|
|
|
2979
2996
|
1
|
|
2980
2997
|
],
|
|
2981
2998
|
"updates": [
|
|
2982
|
-
|
|
2999
|
+
115
|
|
2983
3000
|
],
|
|
2984
3001
|
"__typename": [
|
|
2985
3002
|
27
|
|
@@ -3099,13 +3116,13 @@ var types_default = {
|
|
|
3099
3116
|
},
|
|
3100
3117
|
"PostSubscriptionMessageInput": {
|
|
3101
3118
|
"sms": [
|
|
3102
|
-
|
|
3119
|
+
120
|
|
3103
3120
|
],
|
|
3104
3121
|
"email": [
|
|
3105
|
-
|
|
3122
|
+
121
|
|
3106
3123
|
],
|
|
3107
3124
|
"push": [
|
|
3108
|
-
|
|
3125
|
+
122
|
|
3109
3126
|
],
|
|
3110
3127
|
"__typename": [
|
|
3111
3128
|
27
|
|
@@ -3113,7 +3130,7 @@ var types_default = {
|
|
|
3113
3130
|
},
|
|
3114
3131
|
"CreatePartnerBrandSubscriptionInput": {
|
|
3115
3132
|
"compliance": [
|
|
3116
|
-
|
|
3133
|
+
119
|
|
3117
3134
|
],
|
|
3118
3135
|
"consentText": [
|
|
3119
3136
|
27
|
|
@@ -3134,7 +3151,7 @@ var types_default = {
|
|
|
3134
3151
|
33
|
|
3135
3152
|
],
|
|
3136
3153
|
"postSubscriptionMessage": [
|
|
3137
|
-
|
|
3154
|
+
123
|
|
3138
3155
|
],
|
|
3139
3156
|
"__typename": [
|
|
3140
3157
|
27
|
|
@@ -3188,7 +3205,7 @@ var types_default = {
|
|
|
3188
3205
|
27
|
|
3189
3206
|
],
|
|
3190
3207
|
"transforms": [
|
|
3191
|
-
|
|
3208
|
+
128
|
|
3192
3209
|
],
|
|
3193
3210
|
"createdAt": [
|
|
3194
3211
|
0
|
|
@@ -3236,7 +3253,7 @@ var types_default = {
|
|
|
3236
3253
|
},
|
|
3237
3254
|
"Mutation": {
|
|
3238
3255
|
"getPartnerUploadUrl": [
|
|
3239
|
-
|
|
3256
|
+
126,
|
|
3240
3257
|
{
|
|
3241
3258
|
"filename": [
|
|
3242
3259
|
27,
|
|
@@ -3249,7 +3266,7 @@ var types_default = {
|
|
|
3249
3266
|
}
|
|
3250
3267
|
],
|
|
3251
3268
|
"createPartnerMediaAsset": [
|
|
3252
|
-
|
|
3269
|
+
127,
|
|
3253
3270
|
{
|
|
3254
3271
|
"mimetype": [
|
|
3255
3272
|
27,
|
|
@@ -3260,7 +3277,7 @@ var types_default = {
|
|
|
3260
3277
|
"String!"
|
|
3261
3278
|
],
|
|
3262
3279
|
"dimensions": [
|
|
3263
|
-
|
|
3280
|
+
104,
|
|
3264
3281
|
"DimensionsInput!"
|
|
3265
3282
|
],
|
|
3266
3283
|
"idempotencyKey": [
|
|
@@ -3272,10 +3289,10 @@ var types_default = {
|
|
|
3272
3289
|
}
|
|
3273
3290
|
],
|
|
3274
3291
|
"createPartnerBrandSubscription": [
|
|
3275
|
-
|
|
3292
|
+
129,
|
|
3276
3293
|
{
|
|
3277
3294
|
"input": [
|
|
3278
|
-
|
|
3295
|
+
124,
|
|
3279
3296
|
"CreatePartnerBrandSubscriptionInput!"
|
|
3280
3297
|
]
|
|
3281
3298
|
}
|
|
@@ -3284,16 +3301,16 @@ var types_default = {
|
|
|
3284
3301
|
38,
|
|
3285
3302
|
{
|
|
3286
3303
|
"input": [
|
|
3287
|
-
|
|
3304
|
+
110,
|
|
3288
3305
|
"CreatePartnerMomentInput!"
|
|
3289
3306
|
]
|
|
3290
3307
|
}
|
|
3291
3308
|
],
|
|
3292
3309
|
"sendPartnerAgentEmail": [
|
|
3293
|
-
|
|
3310
|
+
99,
|
|
3294
3311
|
{
|
|
3295
3312
|
"input": [
|
|
3296
|
-
|
|
3313
|
+
106,
|
|
3297
3314
|
"SendPartnerAgentEmailInput!"
|
|
3298
3315
|
]
|
|
3299
3316
|
}
|
|
@@ -3302,7 +3319,7 @@ var types_default = {
|
|
|
3302
3319
|
72,
|
|
3303
3320
|
{
|
|
3304
3321
|
"input": [
|
|
3305
|
-
|
|
3322
|
+
113,
|
|
3306
3323
|
"EditPartnerTicketTiersForMomentInput!"
|
|
3307
3324
|
]
|
|
3308
3325
|
}
|
|
@@ -3311,7 +3328,7 @@ var types_default = {
|
|
|
3311
3328
|
89,
|
|
3312
3329
|
{
|
|
3313
3330
|
"input": [
|
|
3314
|
-
|
|
3331
|
+
117,
|
|
3315
3332
|
"ApplyDynamicPricingInput!"
|
|
3316
3333
|
]
|
|
3317
3334
|
}
|
|
@@ -3320,7 +3337,7 @@ var types_default = {
|
|
|
3320
3337
|
90,
|
|
3321
3338
|
{
|
|
3322
3339
|
"input": [
|
|
3323
|
-
|
|
3340
|
+
125,
|
|
3324
3341
|
"VerifyPartnerBrandSubscriptionInput!"
|
|
3325
3342
|
]
|
|
3326
3343
|
}
|
|
@@ -3329,7 +3346,7 @@ var types_default = {
|
|
|
3329
3346
|
92,
|
|
3330
3347
|
{
|
|
3331
3348
|
"input": [
|
|
3332
|
-
|
|
3349
|
+
118,
|
|
3333
3350
|
"RespondToMomentLineupInput!"
|
|
3334
3351
|
]
|
|
3335
3352
|
}
|