@manta-eu/client 0.3.0 → 0.4.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.
@@ -1,33 +1,64 @@
1
- import jsonld from "jsonld";
1
+ import { isPresent } from "@manta-eu/lib/present";
2
+ import { owlNothingIri } from "@manta-eu/rdf-lib/namespaces";
2
3
  import { encodeEntity } from "ldkit";
3
- import { xsd } from "ldkit/namespaces";
4
- // jsonld keeps the `_:` prefix in a blank node value
5
- function jsonldTerm(term) {
6
- return { termType: term.termType, value: term.termType === "BlankNode" ? `_:${term.value}` : term.value };
4
+ import { rdf, xsd } from "ldkit/namespaces";
5
+ import { groupBy, uniq, uniqBy } from "ramda";
6
+ const termKey = (term) => (term.termType === "BlankNode" ? `_:${term.value}` : term.value);
7
+ const objectKey = ({ object }) => `${termKey(object)} ${object.datatype?.value ?? ""} ${object.language ?? ""}`;
8
+ const oneOrMany = (values) => (values.length === 1 ? values[0] : values);
9
+ function literal(object) {
10
+ const datatype = object.datatype?.value ?? xsd.string;
11
+ if (isPresent(object.language))
12
+ return { "@value": object.value, "@language": object.language };
13
+ if (datatype === xsd.string)
14
+ return object.value;
15
+ return { "@value": object.value, "@type": datatype };
7
16
  }
8
- function jsonldQuad(quad) {
9
- const { subject, predicate, object } = quad;
10
- return {
11
- subject: jsonldTerm(subject),
12
- predicate: { termType: "NamedNode", value: predicate.value },
13
- object: object.termType === "Literal"
14
- ? {
15
- termType: "Literal",
16
- value: object.value,
17
- language: object.language,
18
- datatype: { value: object.datatype?.value ?? xsd.string },
19
- }
20
- : jsonldTerm(object),
21
- graph: { termType: "DefaultGraph", value: "" },
22
- };
23
- }
24
- export async function documentFromQuads(quads, subjectIri) {
17
+ export function documentFromQuads(quads, subjectIri) {
25
18
  const described = quads.filter(({ subject }) => subject.value === subjectIri || subject.termType === "BlankNode");
26
- const flattened = await jsonld.fromRDF(described.map(jsonldQuad));
27
- return jsonld.frame(flattened, { "@id": subjectIri, "@embed": "@always" });
19
+ const bySubject = groupBy((quad) => termKey(quad.subject), described);
20
+ const blankObjects = described.flatMap(({ object }) => (object.termType === "BlankNode" ? [termKey(object)] : []));
21
+ const shared = new Set(blankObjects.filter((key, index) => blankObjects.indexOf(key) !== index));
22
+ const labels = new Map();
23
+ const label = (key) => {
24
+ if (!labels.has(key))
25
+ labels.set(key, `_:b${labels.size}`);
26
+ return labels.get(key) ?? key;
27
+ };
28
+ const value = (object, path) => {
29
+ const key = termKey(object);
30
+ if (object.termType === "Literal")
31
+ return literal(object);
32
+ if (object.termType !== "BlankNode")
33
+ return { "@id": key };
34
+ if (path.includes(key))
35
+ return { "@id": label(key) };
36
+ return node(key, [...path, key]);
37
+ };
38
+ const node = (key, path) => {
39
+ const own = bySubject[key] ?? [];
40
+ const types = own.filter(({ predicate }) => predicate.value === rdf.type).map(({ object }) => termKey(object));
41
+ const others = own.filter(({ predicate }) => predicate.value !== rdf.type);
42
+ const byPredicate = groupBy((quad) => quad.predicate.value, others);
43
+ return {
44
+ ...(shared.has(key) && { "@id": label(key) }),
45
+ ...(isPresent(types) && { "@type": oneOrMany(uniq(types)) }),
46
+ ...Object.fromEntries(Object.entries(byPredicate).map(([predicate, values = []]) => [
47
+ predicate,
48
+ oneOrMany(uniqBy(objectKey, values).map(({ object }) => value(object, path))),
49
+ ])),
50
+ };
51
+ };
52
+ return { "@id": subjectIri, ...node(subjectIri, [subjectIri]) };
28
53
  }
29
54
  export function entityActionDocument(schema, entity) {
30
55
  const quads = encodeEntity(schema, entity).filter((quad) => quad.object.termType !== "Variable");
31
56
  return documentFromQuads(quads, entity.$id);
32
57
  }
58
+ const propertyIri = (definition) => typeof definition === "object" && "@id" in definition ? definition["@id"] : String(definition);
59
+ export function entityActionInput(schema, actionShape, entity, cleared = []) {
60
+ const document = entityActionDocument(schema, entity);
61
+ const nothing = Object.fromEntries(cleared.map((key) => [propertyIri(schema[key]), { "@id": owlNothingIri }]));
62
+ return { subjectIri: entity.$id, rdfType: schema["@type"], actionShape, properties: { ...document, ...nothing } };
63
+ }
33
64
  //# sourceMappingURL=action-document.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-document.js","sourceRoot":"","sources":["../../src/shared/action-document.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAA0B,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAYvC,qDAAqD;AACrD,SAAS,UAAU,CAAC,IAAkB;IACpC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AAC5G,CAAC;AAED,SAAS,UAAU,CAAC,IAAkB;IACpC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE5C,OAAO;QACL,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC;QAC5B,SAAS,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE;QAC5D,MAAM,EACJ,MAAM,CAAC,QAAQ,KAAK,SAAS;YAC3B,CAAC,CAAC;gBACE,QAAQ,EAAE,SAAS;gBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE;aAC1D;YACH,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;QACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,EAAE;KAC/C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAA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ts","sourceRoot":"","sources":["../../src/shared/email.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtG,MAAM,MAAM,eAAe,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBnF,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,UAAU,CAAC,CAcrB"}
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/shared/email.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtG,MAAM,MAAM,eAAe,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAsBnF,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,UAAU,CAAC,CAcrB"}
@@ -1,22 +1,24 @@
1
- import { nco, nmo } from "@manta-eu/ldo/namespaces";
1
+ import { NcoEmailAddressSchema } from "@manta-eu/ldo/schemas/nco";
2
+ import { NmoEmailSchema } from "@manta-eu/ldo/schemas/nmo";
2
3
  import { isPresent } from "@manta-eu/lib/present";
3
4
  import { ExecuteAgentActionAdditionDocument } from "../generated/graphql.js";
4
- function renderedEmailAddition(terms, email) {
5
- return {
6
- subjectIri: email.subjectIri,
7
- rdfType: nmo.Email,
8
- actionShape: terms.emailMessageShape,
9
- properties: {
10
- "@id": email.subjectIri,
11
- "@type": nmo.Email,
12
- [nmo.messageFrom]: { "@type": nco.EmailAddress, [nco.emailAddress]: email.from },
13
- [nmo.emailTo]: { "@type": nco.EmailAddress, [nco.emailAddress]: email.to },
14
- [nmo.messageSubject]: email.subject,
15
- [nmo.contentMimeType]: "text/html",
16
- [terms.renderedFrom]: { "@id": email.renderedFrom },
17
- },
18
- };
19
- }
5
+ import { entityActionInput } from "./action-document.js";
6
+ const renderedEmailSchema = (terms) => ({
7
+ "@type": NmoEmailSchema["@type"],
8
+ from: { "@id": NmoEmailSchema.messageFrom["@id"], "@schema": NcoEmailAddressSchema },
9
+ to: { "@id": NmoEmailSchema.emailTo["@id"], "@schema": NcoEmailAddressSchema },
10
+ subject: NmoEmailSchema.messageSubject,
11
+ contentMimeType: NmoEmailSchema.contentMimeType,
12
+ renderedFrom: { ...NmoEmailSchema.renderedFrom, "@id": terms.renderedFrom },
13
+ });
14
+ const renderedEmailAddition = (terms, email) => entityActionInput(renderedEmailSchema(terms), terms.emailMessageShape, {
15
+ $id: email.subjectIri,
16
+ from: { emailAddress: email.from },
17
+ to: { emailAddress: email.to },
18
+ subject: email.subject,
19
+ contentMimeType: "text/html",
20
+ renderedFrom: email.renderedFrom,
21
+ });
20
22
  export async function startRenderedEmail(graphql, terms, email) {
21
23
  try {
22
24
  const data = (await graphql(ExecuteAgentActionAdditionDocument, {
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/shared/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAA8C,MAAM,sBAAsB,CAAC;AAgBtH,SAAS,qBAAqB,CAAC,KAAsB,EAAE,KAAoB;IACzE,OAAO;QACL,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,OAAO,EAAE,GAAG,CAAC,KAAK;QAClB,WAAW,EAAE,KAAK,CAAC,iBAAiB;QACpC,UAAU,EAAE;YACV,KAAK,EAAE,KAAK,CAAC,UAAU;YACvB,OAAO,EAAE,GAAG,CAAC,KAAK;YAClB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE;YAChF,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;YAC1E,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,OAAO;YACnC,CAAC,GA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MAAM,QAAQ,GAAG,IAAI,EAAE,qBAAqB,CAAC;QAE7C,IAAI,QAAQ,EAAE,OAAO,KAAK,IAAI,IAAI,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YACpE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;QACpD,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,gCAAgC,EAAE,CAAC;IACnF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACtF,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manta-eu/client",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "The Manta GraphQL contract and the typed React Query hooks generated from it",
5
5
  "homepage": "https://developers.manta.eu",
6
6
  "keywords": [
@@ -52,7 +52,6 @@
52
52
  "graphql-request": "^7.3.1",
53
53
  "hono": "^4.9.8",
54
54
  "iso8601-duration": "^2.1.3",
55
- "jsonld": "^8.3.3",
56
55
  "ldkit": "^2.9.0",
57
56
  "mime": "^4.1.0",
58
57
  "ramda": "^0.32.0",
@@ -60,10 +59,10 @@
60
59
  "uuid": "^13.0.0",
61
60
  "whatwg-mimetype": "^5.0.0",
62
61
  "zod": "^4.5.0",
63
- "@manta-eu/ldo": "0.3.0",
64
- "@manta-eu/lib": "0.3.0",
65
- "@manta-eu/rdf-lib": "0.3.0",
66
- "@manta-eu/datalog-parser": "0.3.0"
62
+ "@manta-eu/datalog-parser": "0.4.0",
63
+ "@manta-eu/ldo": "0.4.0",
64
+ "@manta-eu/lib": "0.4.0",
65
+ "@manta-eu/rdf-lib": "0.4.0"
67
66
  },
68
67
  "peerDependencies": {
69
68
  "@tanstack/react-query": "^5.100.10"
@@ -73,7 +72,6 @@
73
72
  "@graphql-codegen/typescript": "^5.0.0",
74
73
  "@graphql-codegen/typescript-operations": "^5.0.0",
75
74
  "@graphql-codegen/typescript-react-query": "^6.1.1",
76
- "@types/jsonld": "^1.5.15",
77
75
  "@types/ramda": "^0.31.1",
78
76
  "@types/whatwg-mimetype": "^5.0.0",
79
77
  "eslint": "^9.39.2",
@@ -852,6 +852,7 @@ export type GQLDatastoreSubscription = {
852
852
  inGoodStanding: Scalars["Boolean"]["output"];
853
853
  interval?: Maybe<Scalars["String"]["output"]>;
854
854
  intervalCount?: Maybe<Scalars["Int"]["output"]>;
855
+ productIds: Array<Scalars["String"]["output"]>;
855
856
  status: Scalars["String"]["output"];
856
857
  };
857
858
 
@@ -1187,6 +1188,7 @@ export enum GQLInferalIntegrationProvider {
1187
1188
  Linkedin = "LINKEDIN",
1188
1189
  Mailchimp = "MAILCHIMP",
1189
1190
  Meta = "META",
1191
+ Microsoftads = "MICROSOFTADS",
1190
1192
  Pinterest = "PINTEREST",
1191
1193
  Shopify = "SHOPIFY",
1192
1194
  Slack = "SLACK",
@@ -1207,10 +1209,41 @@ export enum GQLInferalLocation {
1207
1209
  }
1208
1210
 
1209
1211
  export type GQLInferalProviderInput =
1210
- | { klaviyo: GQLKlaviyoProviderInput; shopify?: never; triplewhale?: never; woocommerce?: never }
1211
- | { klaviyo?: never; shopify: GQLShopifyProviderInput; triplewhale?: never; woocommerce?: never }
1212
- | { klaviyo?: never; shopify?: never; triplewhale: GQLTriplewhaleProviderInput; woocommerce?: never }
1213
- | { klaviyo?: never; shopify?: never; triplewhale?: never; woocommerce: GQLWoocommerceProviderInput };
1212
+ | {
1213
+ klaviyo: GQLKlaviyoProviderInput;
1214
+ microsoftAds?: never;
1215
+ shopify?: never;
1216
+ triplewhale?: never;
1217
+ woocommerce?: never;
1218
+ }
1219
+ | {
1220
+ klaviyo?: never;
1221
+ microsoftAds: GQLMicrosoftAdsProviderInput;
1222
+ shopify?: never;
1223
+ triplewhale?: never;
1224
+ woocommerce?: never;
1225
+ }
1226
+ | {
1227
+ klaviyo?: never;
1228
+ microsoftAds?: never;
1229
+ shopify: GQLShopifyProviderInput;
1230
+ triplewhale?: never;
1231
+ woocommerce?: never;
1232
+ }
1233
+ | {
1234
+ klaviyo?: never;
1235
+ microsoftAds?: never;
1236
+ shopify?: never;
1237
+ triplewhale: GQLTriplewhaleProviderInput;
1238
+ woocommerce?: never;
1239
+ }
1240
+ | {
1241
+ klaviyo?: never;
1242
+ microsoftAds?: never;
1243
+ shopify?: never;
1244
+ triplewhale?: never;
1245
+ woocommerce: GQLWoocommerceProviderInput;
1246
+ };
1214
1247
 
1215
1248
  export type GQLInferalStreamInput = {
1216
1249
  location: GQLInferalLocation;
@@ -1238,6 +1271,7 @@ export enum GQLIntegration {
1238
1271
  GoogleAnalytics = "GOOGLE_ANALYTICS",
1239
1272
  Linkedin = "LINKEDIN",
1240
1273
  Meta = "META",
1274
+ MicrosoftAds = "MICROSOFT_ADS",
1241
1275
  Shopify = "SHOPIFY",
1242
1276
  Slack = "SLACK",
1243
1277
  Snapchat = "SNAPCHAT",
@@ -1600,6 +1634,26 @@ export enum GQLMetaSetupStateEnum {
1600
1634
  TimedOut = "TIMED_OUT",
1601
1635
  }
1602
1636
 
1637
+ export type GQLMicrosoftAdsAccount = {
1638
+ __typename?: "MicrosoftAdsAccount";
1639
+ connectable: Scalars["Boolean"]["output"];
1640
+ customerId?: Maybe<Scalars["String"]["output"]>;
1641
+ id: Scalars["String"]["output"];
1642
+ name?: Maybe<Scalars["String"]["output"]>;
1643
+ number?: Maybe<Scalars["String"]["output"]>;
1644
+ };
1645
+
1646
+ export type GQLMicrosoftAdsProviderInput = {
1647
+ accountId: Scalars["String"]["input"];
1648
+ };
1649
+
1650
+ export type GQLMicrosoftAdsSetupProgress = {
1651
+ __typename?: "MicrosoftAdsSetupProgress";
1652
+ accounts?: Maybe<Array<GQLMicrosoftAdsAccount>>;
1653
+ lastError?: Maybe<GQLGoogleSetupLastError>;
1654
+ state: Array<GQLGoogleSetupStateEnum>;
1655
+ };
1656
+
1603
1657
  export type GQLMutation = {
1604
1658
  __typename?: "Mutation";
1605
1659
  abortUpload: GQLAbortUploadResponse;
@@ -1653,6 +1707,7 @@ export type GQLMutation = {
1653
1707
  manualActionResolve?: Maybe<GQLManualActionResolvePayload>;
1654
1708
  materializeOntologyCoverage: GQLMaterializeOntologyCoverageResponse;
1655
1709
  metaSetupConnect: GQLMetaSetupProgress;
1710
+ microsoftAdsSetupConnect: GQLMicrosoftAdsSetupProgress;
1656
1711
  pauseLDESStream: GQLLdesStreamResponse;
1657
1712
  provisionDatastore: GQLProvisionDatastoreResponse;
1658
1713
  reconfirmMemory: GQLUpdateMemoryResponse;
@@ -1926,6 +1981,11 @@ export type GQLMutationMetaSetupConnectArgs = {
1926
1981
  accountIds: Array<Scalars["String"]["input"]>;
1927
1982
  };
1928
1983
 
1984
+ export type GQLMutationMicrosoftAdsSetupConnectArgs = {
1985
+ accountIds: Array<Scalars["String"]["input"]>;
1986
+ location: GQLInferalLocation;
1987
+ };
1988
+
1929
1989
  export type GQLMutationPauseLdesStreamArgs = {
1930
1990
  url: Scalars["String"]["input"];
1931
1991
  };
@@ -2233,6 +2293,7 @@ export type GQLQuery = {
2233
2293
  memoryReplaySeries: GQLMemoryReplaySeriesResult;
2234
2294
  memorySchemas: GQLMemorySchemasResponse;
2235
2295
  metaSetupProgress: GQLMetaSetupProgress;
2296
+ microsoftAdsSetupProgress: GQLMicrosoftAdsSetupProgress;
2236
2297
  nodeProperties: GQLNodePropertiesResponse;
2237
2298
  nodeRelationships: GQLActionPlanGraphResponse;
2238
2299
  organizationLinking?: Maybe<GQLOrganizationLinking>;
@@ -3937,6 +3998,33 @@ export type GQLMetaSetupConnectMutation = {
3937
3998
  };
3938
3999
  };
3939
4000
 
4001
+ export type GQLMicrosoftAdsSetupConnectMutationVariables = Exact<{
4002
+ accountIds: Array<Scalars["String"]["input"]> | Scalars["String"]["input"];
4003
+ location: GQLInferalLocation;
4004
+ }>;
4005
+
4006
+ export type GQLMicrosoftAdsSetupConnectMutation = {
4007
+ __typename?: "Mutation";
4008
+ microsoftAdsSetupConnect: {
4009
+ __typename?: "MicrosoftAdsSetupProgress";
4010
+ state: Array<GQLGoogleSetupStateEnum>;
4011
+ accounts?: Array<{
4012
+ __typename?: "MicrosoftAdsAccount";
4013
+ id: string;
4014
+ name?: string | null;
4015
+ number?: string | null;
4016
+ customerId?: string | null;
4017
+ connectable: boolean;
4018
+ }> | null;
4019
+ lastError?: {
4020
+ __typename?: "GoogleSetupLastError";
4021
+ severity: string;
4022
+ message: string;
4023
+ title?: string | null;
4024
+ } | null;
4025
+ };
4026
+ };
4027
+
3940
4028
  export type GQLPauseLdesStreamMutationVariables = Exact<{
3941
4029
  url: Scalars["String"]["input"];
3942
4030
  }>;
@@ -5112,6 +5200,7 @@ export type GQLDatastoreSubscriptionsQuery = {
5112
5200
  currency?: string | null;
5113
5201
  interval?: string | null;
5114
5202
  intervalCount?: number | null;
5203
+ productIds: Array<string>;
5115
5204
  }>;
5116
5205
  };
5117
5206
 
@@ -5496,6 +5585,30 @@ export type GQLMetaSetupProgressQuery = {
5496
5585
  };
5497
5586
  };
5498
5587
 
5588
+ export type GQLMicrosoftAdsSetupProgressQueryVariables = Exact<{ [key: string]: never }>;
5589
+
5590
+ export type GQLMicrosoftAdsSetupProgressQuery = {
5591
+ __typename?: "Query";
5592
+ microsoftAdsSetupProgress: {
5593
+ __typename?: "MicrosoftAdsSetupProgress";
5594
+ state: Array<GQLGoogleSetupStateEnum>;
5595
+ accounts?: Array<{
5596
+ __typename?: "MicrosoftAdsAccount";
5597
+ id: string;
5598
+ name?: string | null;
5599
+ number?: string | null;
5600
+ customerId?: string | null;
5601
+ connectable: boolean;
5602
+ }> | null;
5603
+ lastError?: {
5604
+ __typename?: "GoogleSetupLastError";
5605
+ severity: string;
5606
+ message: string;
5607
+ title?: string | null;
5608
+ } | null;
5609
+ };
5610
+ };
5611
+
5499
5612
  export type GQLNodePropertiesQueryVariables = Exact<{
5500
5613
  nodeIri: Scalars["String"]["input"];
5501
5614
  planGraphIri?: InputMaybe<Scalars["IRI"]["input"]>;
@@ -7650,6 +7763,54 @@ export const useMetaSetupConnectMutation = <TError = unknown, TContext = unknown
7650
7763
  });
7651
7764
  };
7652
7765
 
7766
+ export const MicrosoftAdsSetupConnectDocument = `
7767
+ mutation MicrosoftAdsSetupConnect($accountIds: [String!]!, $location: InferalLocation!) {
7768
+ microsoftAdsSetupConnect(accountIds: $accountIds, location: $location) {
7769
+ state
7770
+ accounts {
7771
+ id
7772
+ name
7773
+ number
7774
+ customerId
7775
+ connectable
7776
+ }
7777
+ lastError {
7778
+ severity
7779
+ message
7780
+ title
7781
+ }
7782
+ }
7783
+ }
7784
+ `;
7785
+
7786
+ export const useMicrosoftAdsSetupConnectMutation = <TError = unknown, TContext = unknown>(
7787
+ client: GraphQLClient,
7788
+ options?: UseMutationOptions<
7789
+ GQLMicrosoftAdsSetupConnectMutation,
7790
+ TError,
7791
+ GQLMicrosoftAdsSetupConnectMutationVariables,
7792
+ TContext
7793
+ >,
7794
+ headers?: RequestInit["headers"],
7795
+ ) => {
7796
+ return useMutation<
7797
+ GQLMicrosoftAdsSetupConnectMutation,
7798
+ TError,
7799
+ GQLMicrosoftAdsSetupConnectMutationVariables,
7800
+ TContext
7801
+ >({
7802
+ mutationKey: ["MicrosoftAdsSetupConnect"],
7803
+ mutationFn: (variables?: GQLMicrosoftAdsSetupConnectMutationVariables) =>
7804
+ fetcher<GQLMicrosoftAdsSetupConnectMutation, GQLMicrosoftAdsSetupConnectMutationVariables>(
7805
+ client,
7806
+ MicrosoftAdsSetupConnectDocument,
7807
+ variables,
7808
+ headers,
7809
+ )(),
7810
+ ...options,
7811
+ });
7812
+ };
7813
+
7653
7814
  export const PauseLdesStreamDocument = `
7654
7815
  mutation PauseLdesStream($url: String!) {
7655
7816
  pauseLDESStream(url: $url) {
@@ -10076,6 +10237,7 @@ export const DatastoreSubscriptionsDocument = `
10076
10237
  currency
10077
10238
  interval
10078
10239
  intervalCount
10240
+ productIds
10079
10241
  }
10080
10242
  }
10081
10243
  `;
@@ -11116,6 +11278,75 @@ export const useSuspenseMetaSetupProgressQuery = <TData = GQLMetaSetupProgressQu
11116
11278
  useSuspenseMetaSetupProgressQuery.getKey = (variables?: GQLMetaSetupProgressQueryVariables) =>
11117
11279
  variables === undefined ? ["MetaSetupProgressSuspense"] : ["MetaSetupProgressSuspense", variables];
11118
11280
 
11281
+ export const MicrosoftAdsSetupProgressDocument = `
11282
+ query MicrosoftAdsSetupProgress {
11283
+ microsoftAdsSetupProgress {
11284
+ state
11285
+ accounts {
11286
+ id
11287
+ name
11288
+ number
11289
+ customerId
11290
+ connectable
11291
+ }
11292
+ lastError {
11293
+ severity
11294
+ message
11295
+ title
11296
+ }
11297
+ }
11298
+ }
11299
+ `;
11300
+
11301
+ export const useMicrosoftAdsSetupProgressQuery = <TData = GQLMicrosoftAdsSetupProgressQuery, TError = unknown>(
11302
+ client: GraphQLClient,
11303
+ variables?: GQLMicrosoftAdsSetupProgressQueryVariables,
11304
+ options?: Omit<UseQueryOptions<GQLMicrosoftAdsSetupProgressQuery, TError, TData>, "queryKey"> & {
11305
+ queryKey?: UseQueryOptions<GQLMicrosoftAdsSetupProgressQuery, TError, TData>["queryKey"];
11306
+ },
11307
+ headers?: RequestInit["headers"],
11308
+ ) => {
11309
+ return useQuery<GQLMicrosoftAdsSetupProgressQuery, TError, TData>({
11310
+ queryKey: variables === undefined ? ["MicrosoftAdsSetupProgress"] : ["MicrosoftAdsSetupProgress", variables],
11311
+ queryFn: fetcher<GQLMicrosoftAdsSetupProgressQuery, GQLMicrosoftAdsSetupProgressQueryVariables>(
11312
+ client,
11313
+ MicrosoftAdsSetupProgressDocument,
11314
+ variables,
11315
+ headers,
11316
+ ),
11317
+ ...options,
11318
+ });
11319
+ };
11320
+
11321
+ useMicrosoftAdsSetupProgressQuery.getKey = (variables?: GQLMicrosoftAdsSetupProgressQueryVariables) =>
11322
+ variables === undefined ? ["MicrosoftAdsSetupProgress"] : ["MicrosoftAdsSetupProgress", variables];
11323
+
11324
+ export const useSuspenseMicrosoftAdsSetupProgressQuery = <TData = GQLMicrosoftAdsSetupProgressQuery, TError = unknown>(
11325
+ client: GraphQLClient,
11326
+ variables?: GQLMicrosoftAdsSetupProgressQueryVariables,
11327
+ options?: Omit<UseSuspenseQueryOptions<GQLMicrosoftAdsSetupProgressQuery, TError, TData>, "queryKey"> & {
11328
+ queryKey?: UseSuspenseQueryOptions<GQLMicrosoftAdsSetupProgressQuery, TError, TData>["queryKey"];
11329
+ },
11330
+ headers?: RequestInit["headers"],
11331
+ ) => {
11332
+ return useSuspenseQuery<GQLMicrosoftAdsSetupProgressQuery, TError, TData>({
11333
+ queryKey:
11334
+ variables === undefined
11335
+ ? ["MicrosoftAdsSetupProgressSuspense"]
11336
+ : ["MicrosoftAdsSetupProgressSuspense", variables],
11337
+ queryFn: fetcher<GQLMicrosoftAdsSetupProgressQuery, GQLMicrosoftAdsSetupProgressQueryVariables>(
11338
+ client,
11339
+ MicrosoftAdsSetupProgressDocument,
11340
+ variables,
11341
+ headers,
11342
+ ),
11343
+ ...options,
11344
+ });
11345
+ };
11346
+
11347
+ useSuspenseMicrosoftAdsSetupProgressQuery.getKey = (variables?: GQLMicrosoftAdsSetupProgressQueryVariables) =>
11348
+ variables === undefined ? ["MicrosoftAdsSetupProgressSuspense"] : ["MicrosoftAdsSetupProgressSuspense", variables];
11349
+
11119
11350
  export const NodePropertiesDocument = `
11120
11351
  query NodeProperties($nodeIri: String!, $planGraphIri: IRI) {
11121
11352
  nodeProperties(nodeIri: $nodeIri, planGraphIri: $planGraphIri) {