@adport/provider-tiktok 0.10.0 → 0.11.1
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/index.d.ts +65 -24
- package/dist/index.js +378 -263
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ interface Page {
|
|
|
43
43
|
page: number;
|
|
44
44
|
page_size: number;
|
|
45
45
|
}
|
|
46
|
-
interface Plan$
|
|
46
|
+
interface Plan$e {
|
|
47
47
|
summary: string;
|
|
48
48
|
changes: string[];
|
|
49
49
|
coercions: string[];
|
|
@@ -111,7 +111,7 @@ declare class TikTokCreativeService {
|
|
|
111
111
|
truncated: boolean;
|
|
112
112
|
}>;
|
|
113
113
|
private owned;
|
|
114
|
-
plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$
|
|
114
|
+
plan(op: WriteOperation, guard: WriteGuard): Promise<Plan$e>;
|
|
115
115
|
private upload;
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -121,7 +121,7 @@ declare const savedAudienceList: z.ZodObject<{
|
|
|
121
121
|
page: z.ZodDefault<z.ZodNumber>;
|
|
122
122
|
page_size: z.ZodDefault<z.ZodNumber>;
|
|
123
123
|
}, z.core.$strip>;
|
|
124
|
-
type Plan$
|
|
124
|
+
type Plan$d = Omit<WritePreview, 'serverValidated'> & {
|
|
125
125
|
execute(): Promise<string[]>;
|
|
126
126
|
};
|
|
127
127
|
/** Wire contracts: TikTok-owned SDK/OpenAPI f809c396, dmp/saved_audience/{list,create,delete}. */
|
|
@@ -155,10 +155,10 @@ declare class TikTokAudienceService {
|
|
|
155
155
|
advertiser_id?: string | undefined;
|
|
156
156
|
};
|
|
157
157
|
}>;
|
|
158
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
158
|
+
plan(op: WriteOperation): Promise<Plan$d>;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
type Plan$
|
|
161
|
+
type Plan$c = Omit<WritePreview, 'serverValidated'> & {
|
|
162
162
|
execute(): Promise<WriteResult>;
|
|
163
163
|
};
|
|
164
164
|
/** Official SDK f809c396 plus public v1.3 docs, refreshed 2026-11-06. */
|
|
@@ -275,7 +275,7 @@ declare class TikTokCustomAudiences {
|
|
|
275
275
|
}[]>;
|
|
276
276
|
private uploads;
|
|
277
277
|
private owned;
|
|
278
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
278
|
+
plan(op: WriteOperation): Promise<Plan$c>;
|
|
279
279
|
private uploadPlan;
|
|
280
280
|
private createPlan;
|
|
281
281
|
private deletePlan;
|
|
@@ -350,7 +350,7 @@ declare class TikTokAudienceSources {
|
|
|
350
350
|
}>;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
type Plan$
|
|
353
|
+
type Plan$b = Omit<WritePreview, 'serverValidated'> & {
|
|
354
354
|
execute(): Promise<WriteResult>;
|
|
355
355
|
};
|
|
356
356
|
declare class TikTokAudienceAuthoring {
|
|
@@ -377,7 +377,7 @@ declare class TikTokAudienceAuthoring {
|
|
|
377
377
|
private read;
|
|
378
378
|
private created;
|
|
379
379
|
private receipt;
|
|
380
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
380
|
+
plan(op: WriteOperation): Promise<Plan$b>;
|
|
381
381
|
private rulePlan;
|
|
382
382
|
private refreshPlan;
|
|
383
383
|
}
|
|
@@ -405,7 +405,7 @@ declare const pixelStats: z.ZodObject<{
|
|
|
405
405
|
end_date: z.ZodISODate;
|
|
406
406
|
}, z.core.$strict>;
|
|
407
407
|
}, z.core.$strip>;
|
|
408
|
-
type Plan$
|
|
408
|
+
type Plan$a = Omit<WritePreview, 'serverValidated'> & {
|
|
409
409
|
execute(): Promise<string[]>;
|
|
410
410
|
};
|
|
411
411
|
/** TikTok-owned SDK f809c396: pixel/{list,create,update} and pixel/event/stats. */
|
|
@@ -451,7 +451,7 @@ declare class TikTokMeasurementService {
|
|
|
451
451
|
};
|
|
452
452
|
list: Record<string, unknown>[];
|
|
453
453
|
}>;
|
|
454
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
454
|
+
plan(op: WriteOperation): Promise<Plan$a>;
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
declare const automatedRuleList: z.ZodObject<{
|
|
@@ -622,6 +622,7 @@ declare const catalogScope: z.ZodObject<{
|
|
|
622
622
|
kind: z.ZodEnum<{
|
|
623
623
|
catalog: "catalog";
|
|
624
624
|
catalog_creation: "catalog_creation";
|
|
625
|
+
catalog_migration: "catalog_migration";
|
|
625
626
|
}>;
|
|
626
627
|
}, z.core.$strict>;
|
|
627
628
|
type TikTokCatalogScope = z.infer<typeof catalogScope>;
|
|
@@ -630,6 +631,7 @@ declare const catalogAccessMode: z.ZodEnum<{
|
|
|
630
631
|
read: "read";
|
|
631
632
|
write: "write";
|
|
632
633
|
create: "create";
|
|
634
|
+
migrate: "migrate";
|
|
633
635
|
}>;
|
|
634
636
|
type TikTokCatalogAccessMode = z.infer<typeof catalogAccessMode>;
|
|
635
637
|
interface TikTokCatalogGrant {
|
|
@@ -654,6 +656,8 @@ declare function catalogGrant(scope: TikTokCatalogScope, mode?: TikTokCatalogAcc
|
|
|
654
656
|
declare function catalogScopeKey(scope: TikTokCatalogScope): string;
|
|
655
657
|
declare function requireCatalogAccess(store: TikTokCatalogAccessStore | undefined, scope: TikTokCatalogScope, write?: boolean): Promise<TikTokCatalogGrant>;
|
|
656
658
|
declare const creationScope: (accountId: string, businessId: string) => TikTokCatalogScope;
|
|
659
|
+
declare const migrationScope: (accountId: string, businessId: string, resourceId: string) => TikTokCatalogScope;
|
|
660
|
+
declare function requireCatalogMigrationAccess(store: TikTokCatalogAccessStore | undefined, scope: TikTokCatalogScope, write?: boolean): Promise<TikTokCatalogGrant>;
|
|
657
661
|
declare function requireCatalogCreationAccess(store: TikTokCatalogAccessStore | undefined, scope: TikTokCatalogScope, write?: boolean): Promise<TikTokCatalogGrant>;
|
|
658
662
|
/** Local-owner scope, separate from OAuth secrets. No default Business Center wildcard. */
|
|
659
663
|
declare class FileTikTokCatalogAccessStore implements TikTokCatalogAccessStore {
|
|
@@ -676,7 +680,7 @@ declare const catalogInput: z.ZodObject<{
|
|
|
676
680
|
}, z.core.$strict>;
|
|
677
681
|
|
|
678
682
|
type CatalogSelection = z.infer<typeof catalogInput>;
|
|
679
|
-
type Plan$
|
|
683
|
+
type Plan$9 = Omit<WritePreview, 'serverValidated'> & {
|
|
680
684
|
execute(): Promise<string[]>;
|
|
681
685
|
};
|
|
682
686
|
/** Native set lists are unpaged; Adport pages a bounded, snapshot-bound result. */
|
|
@@ -744,7 +748,7 @@ declare class TikTokCatalogProductSets {
|
|
|
744
748
|
total_page?: number | undefined;
|
|
745
749
|
} | undefined;
|
|
746
750
|
}>;
|
|
747
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
751
|
+
plan(op: WriteOperation): Promise<Plan$9>;
|
|
748
752
|
private uploadPlan;
|
|
749
753
|
private createPlan;
|
|
750
754
|
private conditionsPlan;
|
|
@@ -756,7 +760,7 @@ type Parent$4 = {
|
|
|
756
760
|
configuration_hash: string;
|
|
757
761
|
catalog_conf: Record<string, unknown>;
|
|
758
762
|
};
|
|
759
|
-
type Plan$
|
|
763
|
+
type Plan$8 = Omit<WritePreview, 'serverValidated'> & {
|
|
760
764
|
execute(): Promise<string[]>;
|
|
761
765
|
};
|
|
762
766
|
/** Business Center catalog feeds. Native lists are unpaged and locally bounded. */
|
|
@@ -833,11 +837,11 @@ declare class TikTokCatalogFeeds {
|
|
|
833
837
|
more_history_available: null;
|
|
834
838
|
notes: string[];
|
|
835
839
|
}>;
|
|
836
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
840
|
+
plan(op: WriteOperation): Promise<Plan$8>;
|
|
837
841
|
}
|
|
838
842
|
|
|
839
843
|
type Selection$2 = z.infer<typeof catalogInput>;
|
|
840
|
-
type Plan$
|
|
844
|
+
type Plan$7 = Omit<WritePreview, 'serverValidated'> & {
|
|
841
845
|
execute(): Promise<string[]>;
|
|
842
846
|
};
|
|
843
847
|
/** Native file imports return task IDs. Acceptance never certifies completed ingestion. */
|
|
@@ -958,7 +962,7 @@ declare class TikTokCatalogProducts {
|
|
|
958
962
|
truncated: boolean;
|
|
959
963
|
notes: string[];
|
|
960
964
|
}>;
|
|
961
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
965
|
+
plan(op: WriteOperation): Promise<Plan$7>;
|
|
962
966
|
}
|
|
963
967
|
|
|
964
968
|
type Row$1 = Record<string, unknown>;
|
|
@@ -967,7 +971,7 @@ type Parent$3 = {
|
|
|
967
971
|
configuration_hash: string;
|
|
968
972
|
catalog_type: string;
|
|
969
973
|
};
|
|
970
|
-
type Plan$
|
|
974
|
+
type Plan$6 = Omit<WritePreview, 'serverValidated'> & {
|
|
971
975
|
execute(): Promise<string[]>;
|
|
972
976
|
};
|
|
973
977
|
/** Fixed native product endpoints; every apply is a single asynchronous submission. */
|
|
@@ -1021,10 +1025,10 @@ declare class TikTokCatalogProductAuthoring {
|
|
|
1021
1025
|
truncated: boolean;
|
|
1022
1026
|
notes: string[];
|
|
1023
1027
|
}>;
|
|
1024
|
-
plan(op: WriteOperation): Promise<Plan$
|
|
1028
|
+
plan(op: WriteOperation): Promise<Plan$6>;
|
|
1025
1029
|
}
|
|
1026
1030
|
|
|
1027
|
-
type Scope$
|
|
1031
|
+
type Scope$2 = z.infer<typeof catalogInput>;
|
|
1028
1032
|
type Catalog = {
|
|
1029
1033
|
catalog_id: string;
|
|
1030
1034
|
catalog_name: string;
|
|
@@ -1038,7 +1042,7 @@ type Catalog = {
|
|
|
1038
1042
|
type Parent$2 = Catalog & {
|
|
1039
1043
|
configuration_hash: string;
|
|
1040
1044
|
};
|
|
1041
|
-
type Plan$
|
|
1045
|
+
type Plan$5 = Omit<WritePreview, 'serverValidated'> & {
|
|
1042
1046
|
execute(): Promise<string[]>;
|
|
1043
1047
|
};
|
|
1044
1048
|
/** Create delegation covers only exact new receipts, never existing Business Center catalogs. */
|
|
@@ -1047,7 +1051,7 @@ declare class TikTokCatalogLifecycle {
|
|
|
1047
1051
|
private readonly store;
|
|
1048
1052
|
private readonly parent;
|
|
1049
1053
|
private readonly lookup;
|
|
1050
|
-
constructor(client: Pick<TikTokClient, 'get' | 'post'>, store: TikTokCatalogAccessStore | undefined, parent: (scope: Scope$
|
|
1054
|
+
constructor(client: Pick<TikTokClient, 'get' | 'post'>, store: TikTokCatalogAccessStore | undefined, parent: (scope: Scope$2, write?: boolean) => Promise<Parent$2>, lookup: (scope: Scope$2) => Promise<Catalog | undefined>);
|
|
1051
1055
|
availableCountries(bcId: string): Promise<string[]>;
|
|
1052
1056
|
context(value: unknown): Promise<{
|
|
1053
1057
|
expected_creation_access_hash: string;
|
|
@@ -1065,6 +1069,42 @@ declare class TikTokCatalogLifecycle {
|
|
|
1065
1069
|
truncated: boolean;
|
|
1066
1070
|
notes: string[];
|
|
1067
1071
|
}>;
|
|
1072
|
+
plan(op: WriteOperation): Promise<Plan$5>;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
type Scope$1 = z.infer<typeof catalogInput>;
|
|
1076
|
+
type Plan$4 = Omit<WritePreview, 'serverValidated'> & {
|
|
1077
|
+
execute(): Promise<string[]>;
|
|
1078
|
+
};
|
|
1079
|
+
declare class TikTokCatalogMigration {
|
|
1080
|
+
private readonly client;
|
|
1081
|
+
private readonly store;
|
|
1082
|
+
private readonly lookup;
|
|
1083
|
+
constructor(client: Pick<TikTokClient, 'get' | 'post'>, store: TikTokCatalogAccessStore | undefined, lookup: (input: Scope$1) => Promise<unknown | undefined>);
|
|
1084
|
+
destination(bcId: string): Promise<{
|
|
1085
|
+
bc_id: string;
|
|
1086
|
+
name: string;
|
|
1087
|
+
user_role: string;
|
|
1088
|
+
}>;
|
|
1089
|
+
context(raw: unknown): Promise<{
|
|
1090
|
+
expected_migration_access_hash: string;
|
|
1091
|
+
expected_destination_hash: string;
|
|
1092
|
+
source_ownership: "OWNER_ATTESTED_NOT_INDEPENDENTLY_VERIFIED";
|
|
1093
|
+
destination: {
|
|
1094
|
+
bc_id: string;
|
|
1095
|
+
name: string;
|
|
1096
|
+
user_role: string;
|
|
1097
|
+
};
|
|
1098
|
+
records: {
|
|
1099
|
+
id: string;
|
|
1100
|
+
name: string;
|
|
1101
|
+
source_advertiser_id: string;
|
|
1102
|
+
destination_business_center_id: string;
|
|
1103
|
+
source_ownership: string;
|
|
1104
|
+
destination_role: string;
|
|
1105
|
+
}[];
|
|
1106
|
+
notes: string[];
|
|
1107
|
+
}>;
|
|
1068
1108
|
plan(op: WriteOperation): Promise<Plan$4>;
|
|
1069
1109
|
}
|
|
1070
1110
|
|
|
@@ -1322,6 +1362,7 @@ declare class TikTokCatalogService {
|
|
|
1322
1362
|
readonly videos: TikTokCatalogVideos;
|
|
1323
1363
|
readonly eventSources: TikTokCatalogEventSources;
|
|
1324
1364
|
readonly lifecycle: TikTokCatalogLifecycle;
|
|
1365
|
+
readonly migration: TikTokCatalogMigration;
|
|
1325
1366
|
constructor(client: Pick<TikTokClient, 'get' | 'post'> & Partial<Pick<TikTokClient, 'postMultipart'>>, store?: TikTokCatalogAccessStore | undefined, media?: MediaResolver);
|
|
1326
1367
|
private manager;
|
|
1327
1368
|
private native;
|
|
@@ -1331,7 +1372,7 @@ declare class TikTokCatalogService {
|
|
|
1331
1372
|
id: string;
|
|
1332
1373
|
name: string;
|
|
1333
1374
|
business_center_id: string;
|
|
1334
|
-
access: "none" | "read" | "write" | "create";
|
|
1375
|
+
access: "none" | "read" | "write" | "create" | "migrate";
|
|
1335
1376
|
}[];
|
|
1336
1377
|
notes: string[];
|
|
1337
1378
|
}>;
|
|
@@ -1341,7 +1382,7 @@ declare class TikTokCatalogService {
|
|
|
1341
1382
|
id: string;
|
|
1342
1383
|
name: string;
|
|
1343
1384
|
business_center_id: string;
|
|
1344
|
-
access: "none" | "read" | "write" | "create";
|
|
1385
|
+
access: "none" | "read" | "write" | "create" | "migrate";
|
|
1345
1386
|
}[];
|
|
1346
1387
|
}>;
|
|
1347
1388
|
get(value: unknown): Promise<{
|
|
@@ -1532,4 +1573,4 @@ declare function resolveTikTokCredentials(store: CredentialStore): Promise<(TikT
|
|
|
1532
1573
|
}) | undefined>;
|
|
1533
1574
|
declare function createTikTokModule(store: CredentialStore): Promise<ProviderModule | undefined>;
|
|
1534
1575
|
|
|
1535
|
-
export { FileTikTokCatalogAccessStore, TIKTOK_API_VERSION, TikTokAdsProvider, type TikTokCatalogAccessMode, type TikTokCatalogAccessStore, type TikTokCatalogGrant, type TikTokCatalogScope, TikTokCatalogService, TikTokClient, type TikTokCredentials, UNITS_TO_MICROS, catalogGrant, catalogScope, catalogScopeKey, createTikTokModule, creationScope, requireCatalogAccess, requireCatalogCreationAccess, resolveTikTokCredentials, tiktokCatalogTools, tiktokTools };
|
|
1576
|
+
export { FileTikTokCatalogAccessStore, TIKTOK_API_VERSION, TikTokAdsProvider, type TikTokCatalogAccessMode, type TikTokCatalogAccessStore, type TikTokCatalogGrant, type TikTokCatalogScope, TikTokCatalogService, TikTokClient, type TikTokCredentials, UNITS_TO_MICROS, catalogGrant, catalogScope, catalogScopeKey, createTikTokModule, creationScope, migrationScope, requireCatalogAccess, requireCatalogCreationAccess, requireCatalogMigrationAccess, resolveTikTokCredentials, tiktokCatalogTools, tiktokTools };
|