@graph8/sdk 0.358.0 → 0.361.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/react.d.mts CHANGED
@@ -403,6 +403,18 @@ interface GlobalContextDocument {
403
403
  metadata: Record<string, unknown> | null;
404
404
  created_at: string | null;
405
405
  updated_at: string | null;
406
+ /** Fields the endpoint actually returns (the ones above predate them). */
407
+ display_name?: string | null;
408
+ file_type?: string | null;
409
+ folder_path?: string | null;
410
+ status?: string | null;
411
+ priority?: number | null;
412
+ version?: string | number | null;
413
+ /** The group the Studio Wiki shows the document under (TAM / ICP / Persona
414
+ * Research are stored as market/audience but shown under "targeting"). */
415
+ wiki_category?: string;
416
+ /** Which Wiki bucket the row came from. */
417
+ workflow?: "context" | "intelligence" | "research";
406
418
  }
407
419
  interface Persona {
408
420
  id: string;
@@ -413,6 +425,20 @@ interface Persona {
413
425
  goals: string[];
414
426
  channels: string[];
415
427
  created_at: string | null;
428
+ /** Fields GET /personas actually returns (cb_personas columns). The persona's
429
+ * name is `title`, its "why" is `why_target`, its signals are `key_signals`. */
430
+ title?: string | null;
431
+ why_target?: string | null;
432
+ key_signals?: unknown[];
433
+ campaign_approach?: string | null;
434
+ recommended_goal?: string | null;
435
+ expected_receptivity?: string | null;
436
+ confidence?: string | null;
437
+ confidence_score?: number | null;
438
+ priority?: number | null;
439
+ pinned?: boolean | null;
440
+ source?: string | null;
441
+ updated_at?: string | null;
416
442
  }
417
443
  interface ICP {
418
444
  id: string;
@@ -426,6 +452,24 @@ interface ICP {
426
452
  revenue_max: number | null;
427
453
  countries: string[] | null;
428
454
  created_at: string | null;
455
+ /** Fields GET /icps actually returns (cb_icps columns). Industries and
456
+ * company sizes live in `firmographics.industries` / `firmographics.company_sizes`. */
457
+ firmographics?: {
458
+ industries?: string[];
459
+ company_sizes?: string[];
460
+ revenue_ranges?: string[];
461
+ geographies?: string[];
462
+ [key: string]: unknown;
463
+ };
464
+ tech_stack?: Record<string, unknown>;
465
+ buying_signals?: unknown[];
466
+ fit_score?: number | null;
467
+ opportunity_score?: number | null;
468
+ readiness_score?: number | null;
469
+ total_score?: number | null;
470
+ pinned?: boolean | null;
471
+ priority?: number | null;
472
+ updated_at?: string | null;
429
473
  }
430
474
  interface IntelligenceData {
431
475
  id: string;
@@ -464,6 +508,10 @@ declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
464
508
  category?: string;
465
509
  limit?: number;
466
510
  include_content?: boolean;
511
+ /** Also list the Wiki's Intelligence documents (metadata only). */
512
+ include_intelligence?: boolean;
513
+ /** Also list the Wiki's Research reports. */
514
+ include_research?: boolean;
467
515
  }): Promise<{
468
516
  data: GlobalContextDocument[];
469
517
  }>;
@@ -3312,10 +3360,14 @@ interface AdCampaignResponse {
3312
3360
  launched_at?: string | null;
3313
3361
  name: string;
3314
3362
  objective?: string | null;
3363
+ /** True when end_date is before today (UTC). Null when the campaign has no end date. */
3364
+ past_end_date?: boolean | null;
3315
3365
  platform: string;
3316
3366
  platform_campaign_id?: string | null;
3317
3367
  start_date?: string | null;
3318
3368
  status: string;
3369
+ /** Plain-language note when the stored status cannot be taken at face value, e.g. the end date has passed but the status still says pending. Null otherwise. */
3370
+ status_note?: string | null;
3319
3371
  sync_config_id: number;
3320
3372
  }
3321
3373
  /**
@@ -8029,6 +8081,8 @@ interface CampaignFullPatchRequest {
8029
8081
  primary_hook?: string | null;
8030
8082
  /** If provided, replaces the sequence step ordering (same as PUT /sequence). */
8031
8083
  sequence_steps?: Array<SequenceStepRef> | null;
8084
+ /** Replace the campaign's channels (email, linkedin, phone, voice_ai, sms). Omit to leave them unchanged. Same as PATCH /campaigns/{id}. */
8085
+ target_channels?: Array<string> | null;
8032
8086
  target_persona?: string | null;
8033
8087
  /** Sequence IDs to UNLINK from this campaign. DELETEs ONLY rows where status='linked'. Launch-audit rows (status='pushed'/'superseded'/'failed') are never touched — those are an immutable historical record. */
8034
8088
  unlink_sequence_ids?: Array<string> | null;
@@ -9003,14 +9057,19 @@ interface ConfirmBookingRequest {
9003
9057
  * This is the irreversible half: records begin landing in graph8 and a
9004
9058
  * migration cannot be un-run, only cancelled part-way.
9005
9059
  *
9006
- * Both fields are OPTIONAL and omitting them accepts the discovery as
9060
+ * Every field is OPTIONAL and omitting them accepts the discovery as
9007
9061
  * proposed - which is the point of previewing it first. Send
9008
- * `field_mappings_override` to change where a CRM field lands, or
9009
- * `selected_list_ids` to import only some lists.
9062
+ * `field_mappings_override` to change where a CRM field lands,
9063
+ * `selected_list_ids` to import only some lists, or `owner_decisions` to say
9064
+ * what happens to the records of Salesforce owners who are not in graph8.
9065
+ * A Salesforce discovery with an `unmatched` owner needs a decision for that
9066
+ * owner: without one the confirm is refused with 422.
9010
9067
  */
9011
9068
  interface ConfirmMigrationRequest {
9012
9069
  /** Per entity type, the mappings to use instead of the discovered ones. Omit to accept what discovery proposed. */
9013
9070
  field_mappings_override?: Record<string, Array<Record<string, unknown>>> | null;
9071
+ /** Salesforce only: one decision per record owner who is not a graph8 member (at most 500). Required for every owner whose `match.status` is `unmatched`; optional `assign` for a `placeholder` owner. `match` moves every record the owner has; `assign` moves only their open deals and open tasks. */
9072
+ owner_decisions?: Array<MigrationOwnerDecision> | null;
9014
9073
  /** Import only these CRM lists. Omit to take every discovered list. */
9015
9074
  selected_list_ids?: Array<string> | null;
9016
9075
  }
@@ -16951,6 +17010,25 @@ interface MergeRecordRequest {
16951
17010
  interface MessageSendRequest {
16952
17011
  text: string;
16953
17012
  }
17013
+ /**
17014
+ * What happens to the records of one Salesforce record owner who is not a graph8 member.
17015
+ *
17016
+ * Discovery lists every record owner in the status's `owners`, each with a
17017
+ * `match.status`. An owner whose status is `unmatched` needs a decision, or
17018
+ * the confirm is refused with 422. An owner whose status is `placeholder`
17019
+ * (inactive in Salesforce, a rep who left) may only be assigned; without a
17020
+ * decision their records stay on the placeholder, as history.
17021
+ */
17022
+ interface MigrationOwnerDecision {
17023
+ /** `invite`: invite the owner to graph8 by email; their records are held for the invited address and become theirs when they first sign in. Invites go out in a member's name, so an API key's confirm with an `invite` decision is refused with 403. `assign`: move only their OPEN deals and OPEN tasks to the graph8 member `assign_to_team_member_id`; contacts, companies and closed records stay on the owner's placeholder. `match`: this Salesforce user IS the graph8 member `assign_to_team_member_id`; EVERY record they own moves to that member. `unassigned`: import their records with no owner. */
17024
+ action: "invite" | "assign" | "unassigned" | "match";
17025
+ /** `assign` and `match` only: the graph8 team member id who receives the records. */
17026
+ assign_to_team_member_id?: string | null;
17027
+ /** `invite` only: the address to invite. Omit to use the owner's Salesforce email. */
17028
+ invite_email?: string | null;
17029
+ /** The owner's Salesforce user id, as discovery listed it in `owners`. */
17030
+ sf_user_id: string;
17031
+ }
16954
17032
  /**
16955
17033
  * Mine conversations for content ideas. SPENDS CREDIT, per conversation.
16956
17034
  *
@@ -27550,6 +27628,8 @@ interface developer_api__interfaces__v1__gtm_campaigns_router__CampaignUpdateReq
27550
27628
  name?: string | null;
27551
27629
  /** Primary hook text */
27552
27630
  primary_hook?: string | null;
27631
+ /** Replace the campaign's channels, e.g. ['email','linkedin']. Accepted values: email, linkedin, phone, voice_ai, sms. Omit to leave them unchanged. Existing documents and steps are not deleted. */
27632
+ target_channels?: Array<string> | null;
27553
27633
  /** Target persona */
27554
27634
  target_persona?: string | null;
27555
27635
  }
@@ -61024,10 +61104,14 @@ interface ApiOperationMap {
61024
61104
  list_global_context_documents_global_context_documents_get: {
61025
61105
  input: {
61026
61106
  query?: {
61027
- /** Filter by context category */
61107
+ /** Filter by context category: brand, audience, messaging, market, offer, targeting, data (case-insensitive). `targeting` matches the Studio Wiki's Targeting group (TAM / ICP / Persona Research). An unknown category that matches no document returns 422 listing the valid categories. */
61028
61108
  category?: string | null;
61029
61109
  /** Include each document's body text at `content` (read from meta_data.content). Default True preserves historical behavior (this endpoint has always returned content); pass false for a lighter metadata-only listing. */
61030
61110
  include_content?: boolean;
61111
+ /** Also list the Wiki's Intelligence documents (website scrape, competitor discovery, organic keywords, brand news, ...) with `workflow`='intelligence' and category 'data'. Metadata only: read a body with GET /intelligence-data ?data_type=<file_type>&include_content=true. Default false (historical shape). */
61112
+ include_intelligence?: boolean;
61113
+ /** Also list the Wiki's Research reports with `workflow`='research' and category 'data'; `content` carries the report markdown when include_content is true. Default false (historical shape). */
61114
+ include_research?: boolean;
61031
61115
  limit?: number;
61032
61116
  };
61033
61117
  headers?: {
@@ -94246,6 +94330,8 @@ declare const useG8: () => {
94246
94330
  category?: string;
94247
94331
  limit?: number;
94248
94332
  include_content?: boolean;
94333
+ include_intelligence?: boolean;
94334
+ include_research?: boolean;
94249
94335
  }): Promise<{
94250
94336
  data: GlobalContextDocument[];
94251
94337
  }>;
package/dist/react.d.ts CHANGED
@@ -403,6 +403,18 @@ interface GlobalContextDocument {
403
403
  metadata: Record<string, unknown> | null;
404
404
  created_at: string | null;
405
405
  updated_at: string | null;
406
+ /** Fields the endpoint actually returns (the ones above predate them). */
407
+ display_name?: string | null;
408
+ file_type?: string | null;
409
+ folder_path?: string | null;
410
+ status?: string | null;
411
+ priority?: number | null;
412
+ version?: string | number | null;
413
+ /** The group the Studio Wiki shows the document under (TAM / ICP / Persona
414
+ * Research are stored as market/audience but shown under "targeting"). */
415
+ wiki_category?: string;
416
+ /** Which Wiki bucket the row came from. */
417
+ workflow?: "context" | "intelligence" | "research";
406
418
  }
407
419
  interface Persona {
408
420
  id: string;
@@ -413,6 +425,20 @@ interface Persona {
413
425
  goals: string[];
414
426
  channels: string[];
415
427
  created_at: string | null;
428
+ /** Fields GET /personas actually returns (cb_personas columns). The persona's
429
+ * name is `title`, its "why" is `why_target`, its signals are `key_signals`. */
430
+ title?: string | null;
431
+ why_target?: string | null;
432
+ key_signals?: unknown[];
433
+ campaign_approach?: string | null;
434
+ recommended_goal?: string | null;
435
+ expected_receptivity?: string | null;
436
+ confidence?: string | null;
437
+ confidence_score?: number | null;
438
+ priority?: number | null;
439
+ pinned?: boolean | null;
440
+ source?: string | null;
441
+ updated_at?: string | null;
416
442
  }
417
443
  interface ICP {
418
444
  id: string;
@@ -426,6 +452,24 @@ interface ICP {
426
452
  revenue_max: number | null;
427
453
  countries: string[] | null;
428
454
  created_at: string | null;
455
+ /** Fields GET /icps actually returns (cb_icps columns). Industries and
456
+ * company sizes live in `firmographics.industries` / `firmographics.company_sizes`. */
457
+ firmographics?: {
458
+ industries?: string[];
459
+ company_sizes?: string[];
460
+ revenue_ranges?: string[];
461
+ geographies?: string[];
462
+ [key: string]: unknown;
463
+ };
464
+ tech_stack?: Record<string, unknown>;
465
+ buying_signals?: unknown[];
466
+ fit_score?: number | null;
467
+ opportunity_score?: number | null;
468
+ readiness_score?: number | null;
469
+ total_score?: number | null;
470
+ pinned?: boolean | null;
471
+ priority?: number | null;
472
+ updated_at?: string | null;
429
473
  }
430
474
  interface IntelligenceData {
431
475
  id: string;
@@ -464,6 +508,10 @@ declare const createStudioClient: (apiKey: string, apiUrl?: string) => {
464
508
  category?: string;
465
509
  limit?: number;
466
510
  include_content?: boolean;
511
+ /** Also list the Wiki's Intelligence documents (metadata only). */
512
+ include_intelligence?: boolean;
513
+ /** Also list the Wiki's Research reports. */
514
+ include_research?: boolean;
467
515
  }): Promise<{
468
516
  data: GlobalContextDocument[];
469
517
  }>;
@@ -3312,10 +3360,14 @@ interface AdCampaignResponse {
3312
3360
  launched_at?: string | null;
3313
3361
  name: string;
3314
3362
  objective?: string | null;
3363
+ /** True when end_date is before today (UTC). Null when the campaign has no end date. */
3364
+ past_end_date?: boolean | null;
3315
3365
  platform: string;
3316
3366
  platform_campaign_id?: string | null;
3317
3367
  start_date?: string | null;
3318
3368
  status: string;
3369
+ /** Plain-language note when the stored status cannot be taken at face value, e.g. the end date has passed but the status still says pending. Null otherwise. */
3370
+ status_note?: string | null;
3319
3371
  sync_config_id: number;
3320
3372
  }
3321
3373
  /**
@@ -8029,6 +8081,8 @@ interface CampaignFullPatchRequest {
8029
8081
  primary_hook?: string | null;
8030
8082
  /** If provided, replaces the sequence step ordering (same as PUT /sequence). */
8031
8083
  sequence_steps?: Array<SequenceStepRef> | null;
8084
+ /** Replace the campaign's channels (email, linkedin, phone, voice_ai, sms). Omit to leave them unchanged. Same as PATCH /campaigns/{id}. */
8085
+ target_channels?: Array<string> | null;
8032
8086
  target_persona?: string | null;
8033
8087
  /** Sequence IDs to UNLINK from this campaign. DELETEs ONLY rows where status='linked'. Launch-audit rows (status='pushed'/'superseded'/'failed') are never touched — those are an immutable historical record. */
8034
8088
  unlink_sequence_ids?: Array<string> | null;
@@ -9003,14 +9057,19 @@ interface ConfirmBookingRequest {
9003
9057
  * This is the irreversible half: records begin landing in graph8 and a
9004
9058
  * migration cannot be un-run, only cancelled part-way.
9005
9059
  *
9006
- * Both fields are OPTIONAL and omitting them accepts the discovery as
9060
+ * Every field is OPTIONAL and omitting them accepts the discovery as
9007
9061
  * proposed - which is the point of previewing it first. Send
9008
- * `field_mappings_override` to change where a CRM field lands, or
9009
- * `selected_list_ids` to import only some lists.
9062
+ * `field_mappings_override` to change where a CRM field lands,
9063
+ * `selected_list_ids` to import only some lists, or `owner_decisions` to say
9064
+ * what happens to the records of Salesforce owners who are not in graph8.
9065
+ * A Salesforce discovery with an `unmatched` owner needs a decision for that
9066
+ * owner: without one the confirm is refused with 422.
9010
9067
  */
9011
9068
  interface ConfirmMigrationRequest {
9012
9069
  /** Per entity type, the mappings to use instead of the discovered ones. Omit to accept what discovery proposed. */
9013
9070
  field_mappings_override?: Record<string, Array<Record<string, unknown>>> | null;
9071
+ /** Salesforce only: one decision per record owner who is not a graph8 member (at most 500). Required for every owner whose `match.status` is `unmatched`; optional `assign` for a `placeholder` owner. `match` moves every record the owner has; `assign` moves only their open deals and open tasks. */
9072
+ owner_decisions?: Array<MigrationOwnerDecision> | null;
9014
9073
  /** Import only these CRM lists. Omit to take every discovered list. */
9015
9074
  selected_list_ids?: Array<string> | null;
9016
9075
  }
@@ -16951,6 +17010,25 @@ interface MergeRecordRequest {
16951
17010
  interface MessageSendRequest {
16952
17011
  text: string;
16953
17012
  }
17013
+ /**
17014
+ * What happens to the records of one Salesforce record owner who is not a graph8 member.
17015
+ *
17016
+ * Discovery lists every record owner in the status's `owners`, each with a
17017
+ * `match.status`. An owner whose status is `unmatched` needs a decision, or
17018
+ * the confirm is refused with 422. An owner whose status is `placeholder`
17019
+ * (inactive in Salesforce, a rep who left) may only be assigned; without a
17020
+ * decision their records stay on the placeholder, as history.
17021
+ */
17022
+ interface MigrationOwnerDecision {
17023
+ /** `invite`: invite the owner to graph8 by email; their records are held for the invited address and become theirs when they first sign in. Invites go out in a member's name, so an API key's confirm with an `invite` decision is refused with 403. `assign`: move only their OPEN deals and OPEN tasks to the graph8 member `assign_to_team_member_id`; contacts, companies and closed records stay on the owner's placeholder. `match`: this Salesforce user IS the graph8 member `assign_to_team_member_id`; EVERY record they own moves to that member. `unassigned`: import their records with no owner. */
17024
+ action: "invite" | "assign" | "unassigned" | "match";
17025
+ /** `assign` and `match` only: the graph8 team member id who receives the records. */
17026
+ assign_to_team_member_id?: string | null;
17027
+ /** `invite` only: the address to invite. Omit to use the owner's Salesforce email. */
17028
+ invite_email?: string | null;
17029
+ /** The owner's Salesforce user id, as discovery listed it in `owners`. */
17030
+ sf_user_id: string;
17031
+ }
16954
17032
  /**
16955
17033
  * Mine conversations for content ideas. SPENDS CREDIT, per conversation.
16956
17034
  *
@@ -27550,6 +27628,8 @@ interface developer_api__interfaces__v1__gtm_campaigns_router__CampaignUpdateReq
27550
27628
  name?: string | null;
27551
27629
  /** Primary hook text */
27552
27630
  primary_hook?: string | null;
27631
+ /** Replace the campaign's channels, e.g. ['email','linkedin']. Accepted values: email, linkedin, phone, voice_ai, sms. Omit to leave them unchanged. Existing documents and steps are not deleted. */
27632
+ target_channels?: Array<string> | null;
27553
27633
  /** Target persona */
27554
27634
  target_persona?: string | null;
27555
27635
  }
@@ -61024,10 +61104,14 @@ interface ApiOperationMap {
61024
61104
  list_global_context_documents_global_context_documents_get: {
61025
61105
  input: {
61026
61106
  query?: {
61027
- /** Filter by context category */
61107
+ /** Filter by context category: brand, audience, messaging, market, offer, targeting, data (case-insensitive). `targeting` matches the Studio Wiki's Targeting group (TAM / ICP / Persona Research). An unknown category that matches no document returns 422 listing the valid categories. */
61028
61108
  category?: string | null;
61029
61109
  /** Include each document's body text at `content` (read from meta_data.content). Default True preserves historical behavior (this endpoint has always returned content); pass false for a lighter metadata-only listing. */
61030
61110
  include_content?: boolean;
61111
+ /** Also list the Wiki's Intelligence documents (website scrape, competitor discovery, organic keywords, brand news, ...) with `workflow`='intelligence' and category 'data'. Metadata only: read a body with GET /intelligence-data ?data_type=<file_type>&include_content=true. Default false (historical shape). */
61112
+ include_intelligence?: boolean;
61113
+ /** Also list the Wiki's Research reports with `workflow`='research' and category 'data'; `content` carries the report markdown when include_content is true. Default false (historical shape). */
61114
+ include_research?: boolean;
61031
61115
  limit?: number;
61032
61116
  };
61033
61117
  headers?: {
@@ -94246,6 +94330,8 @@ declare const useG8: () => {
94246
94330
  category?: string;
94247
94331
  limit?: number;
94248
94332
  include_content?: boolean;
94333
+ include_intelligence?: boolean;
94334
+ include_research?: boolean;
94249
94335
  }): Promise<{
94250
94336
  data: GlobalContextDocument[];
94251
94337
  }>;
package/dist/react.js CHANGED
@@ -981,7 +981,7 @@ var EXTERNAL_ROUTES = {
981
981
  };
982
982
 
983
983
  // src/version.ts
984
- var SDK_VERSION = "0.358.0";
984
+ var SDK_VERSION = "0.361.0";
985
985
  var SDK_CLIENT_ID = `js-sdk/${SDK_VERSION}`;
986
986
 
987
987
  // src/http.ts