@wats/graph 0.3.1 → 0.3.2

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.
Files changed (70) hide show
  1. package/dist/client.d.ts +2 -2
  2. package/dist/client.js +3 -3
  3. package/dist/createFetchTransport.d.ts +1 -1
  4. package/dist/createFetchTransport.js +1 -1
  5. package/dist/createMockTransport.d.ts +1 -1
  6. package/dist/endpoint.d.ts +1 -1
  7. package/dist/endpoint.js +1 -1
  8. package/dist/endpoints/businessManagement.d.ts +9 -9
  9. package/dist/endpoints/businessManagement.js +7 -7
  10. package/dist/endpoints/calling.d.ts +7 -7
  11. package/dist/endpoints/calling.js +2 -2
  12. package/dist/endpoints/flows/callables.d.ts +10 -10
  13. package/dist/endpoints/flows/callables.js +2 -2
  14. package/dist/endpoints/flows/dataExchange.d.ts +1 -1
  15. package/dist/endpoints/flows/dataExchange.js +2 -2
  16. package/dist/endpoints/flows/flowJson.d.ts +1 -1
  17. package/dist/endpoints/flows/flowJson.js +1 -1
  18. package/dist/endpoints/flows/index.d.ts +6 -6
  19. package/dist/endpoints/flows/index.js +4 -4
  20. package/dist/endpoints/flows/shared.d.ts +1 -1
  21. package/dist/endpoints/flows/shared.js +1 -1
  22. package/dist/endpoints/flows/types.d.ts +1 -1
  23. package/dist/endpoints/flows.d.ts +2 -2
  24. package/dist/endpoints/flows.js +1 -1
  25. package/dist/endpoints/media.d.ts +1 -1
  26. package/dist/endpoints/media.js +1 -1
  27. package/dist/endpoints/messages.d.ts +2 -2
  28. package/dist/endpoints/messages.js +2 -2
  29. package/dist/endpoints/templates/builders.d.ts +1 -1
  30. package/dist/endpoints/templates/builders.js +1 -1
  31. package/dist/endpoints/templates/callables.d.ts +6 -6
  32. package/dist/endpoints/templates/callables.js +3 -3
  33. package/dist/endpoints/templates/index.d.ts +5 -5
  34. package/dist/endpoints/templates/index.js +3 -3
  35. package/dist/endpoints/templates/shared.d.ts +2 -2
  36. package/dist/endpoints/templates/shared.js +1 -1
  37. package/dist/endpoints/templates/types.d.ts +1 -1
  38. package/dist/endpoints/templates/validation.d.ts +1 -1
  39. package/dist/endpoints/templates/validation.js +2 -2
  40. package/dist/endpoints/templates.d.ts +2 -2
  41. package/dist/endpoints/templates.js +1 -1
  42. package/dist/endpoints/waba/index.d.ts +4 -4
  43. package/dist/endpoints/waba/index.js +1 -1
  44. package/dist/endpoints/waba/phoneNumbers.d.ts +4 -4
  45. package/dist/endpoints/waba/phoneNumbers.js +3 -3
  46. package/dist/endpoints/wabaEndpoints.d.ts +6 -6
  47. package/dist/endpoints/wabaEndpoints.js +3 -3
  48. package/dist/errorRegistry.d.ts +1 -1
  49. package/dist/errorSubclasses.d.ts +2 -2
  50. package/dist/errorSubclasses.js +2 -2
  51. package/dist/errors.js +1 -1
  52. package/dist/index.d.ts +20 -20
  53. package/dist/index.js +15 -15
  54. package/dist/internal/validation/arrays.js +2 -2
  55. package/dist/internal/validation/errors.d.ts +1 -1
  56. package/dist/internal/validation/errors.js +1 -1
  57. package/dist/internal/validation/headers.js +3 -3
  58. package/dist/internal/validation/index.d.ts +8 -8
  59. package/dist/internal/validation/index.js +8 -8
  60. package/dist/internal/validation/json.js +4 -4
  61. package/dist/internal/validation/options.js +2 -2
  62. package/dist/internal/validation/paths.js +2 -2
  63. package/dist/internal/validation/records.js +2 -2
  64. package/dist/internal/validation/strings.js +1 -1
  65. package/dist/pagination.d.ts +2 -2
  66. package/dist/subclients/phoneNumberClient.d.ts +5 -5
  67. package/dist/subclients/phoneNumberClient.js +6 -6
  68. package/dist/subclients/wabaClient.d.ts +5 -5
  69. package/dist/subclients/wabaClient.js +6 -6
  70. package/package.json +1 -1
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { GraphMessagesEndpoint } from "./endpoints/messages";
2
- import type { Transport, TransportResponse } from "./transport";
1
+ import { GraphMessagesEndpoint } from "./endpoints/messages.js";
2
+ import type { Transport, TransportResponse } from "./transport.js";
3
3
  export declare const DEFAULT_GRAPH_BASE_URL = "https://graph.facebook.com/";
4
4
  export interface GraphClientConfig {
5
5
  accessToken: string;
package/dist/client.js CHANGED
@@ -202,9 +202,9 @@ import {
202
202
  GraphSerializationError,
203
203
  isGraphApiErrorPayload,
204
204
  isGraphErrorEnvelope
205
- } from "./errors";
206
- import { GraphMessagesEndpoint } from "./endpoints/messages";
207
- import { createFetchTransport } from "./createFetchTransport";
205
+ } from "./errors.js";
206
+ import { GraphMessagesEndpoint } from "./endpoints/messages.js";
207
+ import { createFetchTransport } from "./createFetchTransport.js";
208
208
  export const DEFAULT_GRAPH_BASE_URL = "https://graph.facebook.com/";
209
209
  const ACCESS_TOKEN_MAX_LEN = 4096;
210
210
  const API_VERSION_REGEXP = /^v\d+(?:\.\d+)?$/;
@@ -1,4 +1,4 @@
1
- import type { Transport, TransportInterceptor } from "./transport";
1
+ import type { Transport, TransportInterceptor } from "./transport.js";
2
2
  export interface CreateFetchTransportOptions {
3
3
  readonly fetch?: typeof globalThis.fetch;
4
4
  readonly interceptors?: readonly TransportInterceptor[];
@@ -1,4 +1,4 @@
1
- import { GraphNetworkError } from "./errors";
1
+ import { GraphNetworkError } from "./errors.js";
2
2
  function wrapResponse(res) {
3
3
  return {
4
4
  status: res.status,
@@ -1,4 +1,4 @@
1
- import type { Transport, TransportRequest } from "./transport";
1
+ import type { Transport, TransportRequest } from "./transport.js";
2
2
  export type MockTransportResponseSpec = {
3
3
  readonly status: number;
4
4
  readonly headers?: Record<string, string> | Headers;
@@ -1,4 +1,4 @@
1
- import type { GraphClient } from "./client";
1
+ import type { GraphClient } from "./client.js";
2
2
  export type EndpointHttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
3
3
  export interface EndpointParamSpec {
4
4
  readonly in: "path" | "query";
package/dist/endpoint.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphRequestValidationError } from "./errors";
1
+ import { GraphRequestValidationError } from "./errors.js";
2
2
  const ALLOWED_METHODS = new Set([
3
3
  "GET",
4
4
  "POST",
@@ -1,6 +1,6 @@
1
- import { type EndpointInvokeOptions } from "../endpoint";
2
- import type { GraphClient } from "../client";
3
- import type { GraphPaging } from "./waba/types";
1
+ import { type EndpointInvokeOptions } from "../endpoint.js";
2
+ import type { GraphClient } from "../client.js";
3
+ import type { GraphPaging } from "./waba/types.js";
4
4
  export type BusinessManagementFields = string | readonly string[];
5
5
  export interface WabaInfo {
6
6
  readonly id?: string;
@@ -119,37 +119,37 @@ export declare function normalizeBusinessProfileParams(input: GetBusinessProfile
119
119
  export declare function normalizeCommerceSettingsParams(input: GetCommerceSettingsInput): WireParams;
120
120
  export declare function sanitizeBusinessManagementOptions(opts: EndpointInvokeOptions | undefined, helperName: string): EndpointInvokeOptions | undefined;
121
121
  export declare const getWabaInfo: ((client: GraphClient, params: GetWabaInfoInput, body?: never, opts?: EndpointInvokeOptions) => Promise<WabaInfo>) & {
122
- definition: import("..").EndpointDefinition<{
122
+ definition: import("../endpoint.js").EndpointDefinition<{
123
123
  wabaId: string;
124
124
  fields?: string;
125
125
  }, never, WabaInfo>;
126
126
  };
127
127
  export declare const listSubscribedApps: ((client: GraphClient, params: ListSubscribedAppsInput, body?: never, opts?: EndpointInvokeOptions) => Promise<SubscribedAppsResponse>) & {
128
- definition: import("..").EndpointDefinition<{
128
+ definition: import("../endpoint.js").EndpointDefinition<{
129
129
  wabaId: string;
130
130
  }, never, SubscribedAppsResponse>;
131
131
  };
132
132
  export declare const getPhoneNumberInfo: ((client: GraphClient, params: GetPhoneNumberInfoInput, body?: never, opts?: EndpointInvokeOptions) => Promise<PhoneNumberInfo>) & {
133
- definition: import("..").EndpointDefinition<{
133
+ definition: import("../endpoint.js").EndpointDefinition<{
134
134
  phoneNumberId: string;
135
135
  fields?: string;
136
136
  }, never, PhoneNumberInfo>;
137
137
  };
138
138
  export declare const getPhoneNumberSettings: ((client: GraphClient, params: GetPhoneNumberSettingsInput, body?: never, opts?: EndpointInvokeOptions) => Promise<PhoneNumberSettingsResponse>) & {
139
- definition: import("..").EndpointDefinition<{
139
+ definition: import("../endpoint.js").EndpointDefinition<{
140
140
  phoneNumberId: string;
141
141
  fields?: string;
142
142
  include_sip_credentials?: string;
143
143
  }, never, PhoneNumberSettingsResponse>;
144
144
  };
145
145
  export declare const getBusinessProfile: ((client: GraphClient, params: GetBusinessProfileInput, body?: never, opts?: EndpointInvokeOptions) => Promise<BusinessProfileResponse>) & {
146
- definition: import("..").EndpointDefinition<{
146
+ definition: import("../endpoint.js").EndpointDefinition<{
147
147
  phoneNumberId: string;
148
148
  fields?: string;
149
149
  }, never, BusinessProfileResponse>;
150
150
  };
151
151
  export declare const getCommerceSettings: ((client: GraphClient, params: GetCommerceSettingsInput, body?: never, opts?: EndpointInvokeOptions) => Promise<CommerceSettingsResponse>) & {
152
- definition: import("..").EndpointDefinition<{
152
+ definition: import("../endpoint.js").EndpointDefinition<{
153
153
  phoneNumberId: string;
154
154
  fields?: string;
155
155
  }, never, CommerceSettingsResponse>;
@@ -1,17 +1,17 @@
1
- import { defineEndpoint } from "../endpoint";
2
- import { GraphRequestValidationError } from "../errors";
1
+ import { defineEndpoint } from "../endpoint.js";
2
+ import { GraphRequestValidationError } from "../errors.js";
3
3
  import {
4
4
  assertRepeatedlyDecodedSafePathId
5
- } from "../internal/validation/paths";
5
+ } from "../internal/validation/paths.js";
6
6
  import {
7
7
  assertQueryString as assertInternalQueryString
8
- } from "../internal/validation/strings";
9
- import { assertJoinedStringQueryArray } from "../internal/validation/arrays";
10
- import { sanitizeHeaderInit } from "../internal/validation/headers";
8
+ } from "../internal/validation/strings.js";
9
+ import { assertJoinedStringQueryArray } from "../internal/validation/arrays.js";
10
+ import { sanitizeHeaderInit } from "../internal/validation/headers.js";
11
11
  import {
12
12
  assertPlainDataRecord,
13
13
  ownDataValue as ownInternalDataValue
14
- } from "../internal/validation/records";
14
+ } from "../internal/validation/records.js";
15
15
  const MAX_ID_LENGTH = 512;
16
16
  const MAX_QUERY_STRING_LENGTH = 1024;
17
17
  const MAX_FIELD_ARRAY_LENGTH = 50;
@@ -1,5 +1,5 @@
1
- import { type EndpointInvokeOptions } from "../endpoint";
2
- import type { GraphClient } from "../client";
1
+ import { type EndpointInvokeOptions } from "../endpoint.js";
2
+ import type { GraphClient } from "../client.js";
3
3
  export type CallAction = "connect" | "pre_accept" | "accept" | "reject" | "terminate";
4
4
  export type CallSdpType = "offer" | "answer" | string;
5
5
  export declare const CALL_BIZ_OPAQUE_CALLBACK_DATA_MAX_LENGTH = 512;
@@ -48,18 +48,18 @@ type CallsParams = {
48
48
  type WireBody = Record<string, unknown>;
49
49
  export declare function sanitizeCallSession(input: unknown): CallSessionDescriptionPayload;
50
50
  export declare const initiateCall: ((client: GraphClient, params: CallsParams, body: InitiateCallRequest, opts?: EndpointInvokeOptions) => Promise<CallLifecycleResponse>) & {
51
- definition: import("..").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
51
+ definition: import("../endpoint.js").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
52
52
  };
53
53
  export declare const preAcceptCall: ((client: GraphClient, params: CallsParams, body: PreAcceptCallRequest, opts?: EndpointInvokeOptions) => Promise<CallLifecycleResponse>) & {
54
- definition: import("..").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
54
+ definition: import("../endpoint.js").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
55
55
  };
56
56
  export declare const acceptCall: ((client: GraphClient, params: CallsParams, body: AcceptCallRequest, opts?: EndpointInvokeOptions) => Promise<CallLifecycleResponse>) & {
57
- definition: import("..").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
57
+ definition: import("../endpoint.js").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
58
58
  };
59
59
  export declare const rejectCall: ((client: GraphClient, params: CallsParams, body: RejectCallRequest, opts?: EndpointInvokeOptions) => Promise<CallLifecycleResponse>) & {
60
- definition: import("..").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
60
+ definition: import("../endpoint.js").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
61
61
  };
62
62
  export declare const terminateCall: ((client: GraphClient, params: CallsParams, body: TerminateCallRequest, opts?: EndpointInvokeOptions) => Promise<CallLifecycleResponse>) & {
63
- definition: import("..").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
63
+ definition: import("../endpoint.js").EndpointDefinition<CallsParams, WireBody, CallLifecycleResponse>;
64
64
  };
65
65
  export {};
@@ -1,5 +1,5 @@
1
- import { defineEndpoint } from "../endpoint";
2
- import { GraphRequestValidationError } from "../errors";
1
+ import { defineEndpoint } from "../endpoint.js";
2
+ import { GraphRequestValidationError } from "../errors.js";
3
3
  export const CALL_BIZ_OPAQUE_CALLBACK_DATA_MAX_LENGTH = 512;
4
4
  export const CALL_SESSION_MAX_STRING_LENGTH = 16384;
5
5
  export const CALL_SESSION_MAX_DEPTH = 8;
@@ -1,5 +1,5 @@
1
- import type { CreateFlowBody, FlowAssetsResponse, FlowDetails, FlowListResponse, FlowMutationResponse, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./types";
2
- declare const listFlowsRaw: import("../..").EndpointCallable<{
1
+ import type { CreateFlowBody, FlowAssetsResponse, FlowDetails, FlowListResponse, FlowMutationResponse, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./types.js";
2
+ declare const listFlowsRaw: import("../../endpoint.js").EndpointCallable<{
3
3
  wabaId: string;
4
4
  fields?: string;
5
5
  status?: string;
@@ -13,7 +13,7 @@ export declare const listFlows: {
13
13
  (client: Parameters<typeof listFlowsRaw>[0], params: ListFlowsInput, body?: never, opts?: Parameters<typeof listFlowsRaw>[3]): Promise<FlowListResponse>;
14
14
  readonly definition: typeof listFlowsRaw.definition;
15
15
  };
16
- declare const getFlowRaw: import("../..").EndpointCallable<{
16
+ declare const getFlowRaw: import("../../endpoint.js").EndpointCallable<{
17
17
  flowId: string;
18
18
  fields?: string;
19
19
  invalidate_preview?: string;
@@ -23,7 +23,7 @@ export declare const getFlow: {
23
23
  (client: Parameters<typeof getFlowRaw>[0], params: GetFlowInput, body?: never, opts?: Parameters<typeof getFlowRaw>[3]): Promise<FlowDetails>;
24
24
  readonly definition: typeof getFlowRaw.definition;
25
25
  };
26
- declare const createFlowRaw: import("../..").EndpointCallable<{
26
+ declare const createFlowRaw: import("../../endpoint.js").EndpointCallable<{
27
27
  wabaId: string;
28
28
  }, CreateFlowBody, FlowMutationResponse>;
29
29
  export declare const createFlow: {
@@ -32,7 +32,7 @@ export declare const createFlow: {
32
32
  }, body: CreateFlowBody, opts?: Parameters<typeof createFlowRaw>[3]): Promise<FlowMutationResponse>;
33
33
  readonly definition: typeof createFlowRaw.definition;
34
34
  };
35
- declare const updateFlowMetadataRaw: import("../..").EndpointCallable<{
35
+ declare const updateFlowMetadataRaw: import("../../endpoint.js").EndpointCallable<{
36
36
  flowId: string;
37
37
  }, UpdateFlowMetadataBody, FlowMutationResponse>;
38
38
  export declare const updateFlowMetadata: {
@@ -41,7 +41,7 @@ export declare const updateFlowMetadata: {
41
41
  }, body: UpdateFlowMetadataBody, opts?: Parameters<typeof updateFlowMetadataRaw>[3]): Promise<FlowMutationResponse>;
42
42
  readonly definition: typeof updateFlowMetadataRaw.definition;
43
43
  };
44
- declare const updateFlowJsonRaw: import("../..").EndpointCallable<{
44
+ declare const updateFlowJsonRaw: import("../../endpoint.js").EndpointCallable<{
45
45
  flowId: string;
46
46
  }, UpdateFlowJsonBody, FlowMutationResponse>;
47
47
  export declare const updateFlowJson: {
@@ -50,7 +50,7 @@ export declare const updateFlowJson: {
50
50
  }, body: UpdateFlowJsonBody, opts?: Parameters<typeof updateFlowJsonRaw>[3]): Promise<FlowMutationResponse>;
51
51
  readonly definition: typeof updateFlowJsonRaw.definition;
52
52
  };
53
- declare const publishFlowRaw: import("../..").EndpointCallable<{
53
+ declare const publishFlowRaw: import("../../endpoint.js").EndpointCallable<{
54
54
  flowId: string;
55
55
  }, never, FlowMutationResponse>;
56
56
  export declare const publishFlow: {
@@ -59,7 +59,7 @@ export declare const publishFlow: {
59
59
  }, body?: never, opts?: Parameters<typeof publishFlowRaw>[3]): Promise<FlowMutationResponse>;
60
60
  readonly definition: typeof publishFlowRaw.definition;
61
61
  };
62
- declare const deleteFlowRaw: import("../..").EndpointCallable<{
62
+ declare const deleteFlowRaw: import("../../endpoint.js").EndpointCallable<{
63
63
  flowId: string;
64
64
  }, never, FlowMutationResponse>;
65
65
  export declare const deleteFlow: {
@@ -68,7 +68,7 @@ export declare const deleteFlow: {
68
68
  }, body?: never, opts?: Parameters<typeof deleteFlowRaw>[3]): Promise<FlowMutationResponse>;
69
69
  readonly definition: typeof deleteFlowRaw.definition;
70
70
  };
71
- declare const deprecateFlowRaw: import("../..").EndpointCallable<{
71
+ declare const deprecateFlowRaw: import("../../endpoint.js").EndpointCallable<{
72
72
  flowId: string;
73
73
  }, never, FlowMutationResponse>;
74
74
  export declare const deprecateFlow: {
@@ -77,7 +77,7 @@ export declare const deprecateFlow: {
77
77
  }, body?: never, opts?: Parameters<typeof deprecateFlowRaw>[3]): Promise<FlowMutationResponse>;
78
78
  readonly definition: typeof deprecateFlowRaw.definition;
79
79
  };
80
- declare const getFlowAssetsRaw: import("../..").EndpointCallable<{
80
+ declare const getFlowAssetsRaw: import("../../endpoint.js").EndpointCallable<{
81
81
  flowId: string;
82
82
  fields?: string;
83
83
  limit?: string;
@@ -1,4 +1,4 @@
1
- import { defineEndpoint } from "../../endpoint";
1
+ import { defineEndpoint } from "../../endpoint.js";
2
2
  import {
3
3
  flowNormalizePathParams,
4
4
  mapCreateFlowBody,
@@ -7,7 +7,7 @@ import {
7
7
  normalizeFlowAssetsParams,
8
8
  normalizeGetFlowParams,
9
9
  normalizeListFlowsParams
10
- } from "./flowJson";
10
+ } from "./flowJson.js";
11
11
  const listFlowsRaw = defineEndpoint({
12
12
  method: "GET",
13
13
  pathTemplate: "/{wabaId}/flows",
@@ -1,4 +1,4 @@
1
- import type { FlowCloseResponse, FlowCloseResponseInput, FlowErrorResponse, FlowErrorResponseInput, FlowScreenResponse, FlowScreenResponseInput } from "./types";
1
+ import type { FlowCloseResponse, FlowCloseResponseInput, FlowErrorResponse, FlowErrorResponseInput, FlowScreenResponse, FlowScreenResponseInput } from "./types.js";
2
2
  export declare function buildFlowScreenResponse(input: FlowScreenResponseInput): FlowScreenResponse;
3
3
  export declare function buildFlowCloseResponse(input?: FlowCloseResponseInput): FlowCloseResponse;
4
4
  export declare function buildFlowErrorResponse(input: FlowErrorResponseInput): FlowErrorResponse;
@@ -1,5 +1,5 @@
1
- import { flowAssertPlainRecord, flowMaybeString, flowString } from "./shared";
2
- import { flowJsonClone } from "./flowJson";
1
+ import { flowAssertPlainRecord, flowMaybeString, flowString } from "./shared.js";
2
+ import { flowJsonClone } from "./flowJson.js";
3
3
  function cloneFlowResponseData(value, helperName) {
4
4
  if (value === undefined)
5
5
  return;
@@ -1,4 +1,4 @@
1
- import type { CreateFlowBody, FlowJson, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./types";
1
+ import type { CreateFlowBody, FlowJson, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./types.js";
2
2
  interface FlowJsonCloneState {
3
3
  readonly seen: WeakSet<object>;
4
4
  componentCount: number;
@@ -14,7 +14,7 @@ import {
14
14
  flowMaybeString,
15
15
  flowString,
16
16
  flowUrl
17
- } from "./shared";
17
+ } from "./shared.js";
18
18
  export function flowJsonClone(value, helperName, path = "input", state = { seen: new WeakSet, componentCount: 0 }, depth = 0, parentKey = "") {
19
19
  if (depth > FLOW_JSON_MAX_DEPTH) {
20
20
  throw flowError(`Invalid ${helperName} input: ${path} exceeds maximum depth ${FLOW_JSON_MAX_DEPTH}.`);
@@ -1,6 +1,6 @@
1
- export { createFlow, deleteFlow, deprecateFlow, getFlow, getFlowAssets, listFlows, publishFlow, updateFlowJson, updateFlowMetadata } from "./callables";
2
- export { FLOW_JSON_MAX_ARRAY_LENGTH, FLOW_JSON_MAX_BYTES, FLOW_JSON_MAX_COMPONENTS, FLOW_JSON_MAX_DEPTH, FLOW_JSON_MAX_SCREENS, FLOW_JSON_MAX_STRING_LENGTH, FLOW_MAX_CATEGORIES } from "./shared";
3
- export { buildFlowJson, validateFlowJson } from "./flowJson";
4
- export { buildFlowCloseResponse, buildFlowErrorResponse, buildFlowScreenResponse } from "./dataExchange";
5
- export type { GraphPaging } from "../wabaEndpoints";
6
- export type { CreateFlowBody, FlowAssetDetails, FlowAssetsResponse, FlowCategory, FlowCloseResponse, FlowCloseResponseInput, FlowDetails, FlowErrorResponse, FlowErrorResponseInput, FlowJson, FlowListResponse, FlowMutationResponse, FlowScreenResponse, FlowScreenResponseInput, FlowStatus, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./types";
1
+ export { createFlow, deleteFlow, deprecateFlow, getFlow, getFlowAssets, listFlows, publishFlow, updateFlowJson, updateFlowMetadata } from "./callables.js";
2
+ export { FLOW_JSON_MAX_ARRAY_LENGTH, FLOW_JSON_MAX_BYTES, FLOW_JSON_MAX_COMPONENTS, FLOW_JSON_MAX_DEPTH, FLOW_JSON_MAX_SCREENS, FLOW_JSON_MAX_STRING_LENGTH, FLOW_MAX_CATEGORIES } from "./shared.js";
3
+ export { buildFlowJson, validateFlowJson } from "./flowJson.js";
4
+ export { buildFlowCloseResponse, buildFlowErrorResponse, buildFlowScreenResponse } from "./dataExchange.js";
5
+ export type { GraphPaging } from "../wabaEndpoints.js";
6
+ export type { CreateFlowBody, FlowAssetDetails, FlowAssetsResponse, FlowCategory, FlowCloseResponse, FlowCloseResponseInput, FlowDetails, FlowErrorResponse, FlowErrorResponseInput, FlowJson, FlowListResponse, FlowMutationResponse, FlowScreenResponse, FlowScreenResponseInput, FlowStatus, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./types.js";
@@ -8,7 +8,7 @@ export {
8
8
  publishFlow,
9
9
  updateFlowJson,
10
10
  updateFlowMetadata
11
- } from "./callables";
11
+ } from "./callables.js";
12
12
  export {
13
13
  FLOW_JSON_MAX_ARRAY_LENGTH,
14
14
  FLOW_JSON_MAX_BYTES,
@@ -17,10 +17,10 @@ export {
17
17
  FLOW_JSON_MAX_SCREENS,
18
18
  FLOW_JSON_MAX_STRING_LENGTH,
19
19
  FLOW_MAX_CATEGORIES
20
- } from "./shared";
21
- export { buildFlowJson, validateFlowJson } from "./flowJson";
20
+ } from "./shared.js";
21
+ export { buildFlowJson, validateFlowJson } from "./flowJson.js";
22
22
  export {
23
23
  buildFlowCloseResponse,
24
24
  buildFlowErrorResponse,
25
25
  buildFlowScreenResponse
26
- } from "./dataExchange";
26
+ } from "./dataExchange.js";
@@ -1,4 +1,4 @@
1
- import { GraphRequestValidationError } from "../../errors";
1
+ import { GraphRequestValidationError } from "../../errors.js";
2
2
  export declare const FLOW_JSON_MAX_DEPTH = 16;
3
3
  export declare const FLOW_JSON_MAX_ARRAY_LENGTH = 1000;
4
4
  export declare const FLOW_JSON_MAX_SCREENS = 50;
@@ -1,4 +1,4 @@
1
- import { GraphRequestValidationError } from "../../errors";
1
+ import { GraphRequestValidationError } from "../../errors.js";
2
2
  export const FLOW_JSON_MAX_DEPTH = 16;
3
3
  export const FLOW_JSON_MAX_ARRAY_LENGTH = 1000;
4
4
  export const FLOW_JSON_MAX_SCREENS = 50;
@@ -1,4 +1,4 @@
1
- import type { GraphPaging } from "../wabaEndpoints";
1
+ import type { GraphPaging } from "../wabaEndpoints.js";
2
2
  export type FlowStatus = "DRAFT" | "PUBLISHED" | "DEPRECATED" | "BLOCKED" | "THROTTLED" | string;
3
3
  export type FlowCategory = "SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER" | string;
4
4
  export interface FlowDetails {
@@ -1,2 +1,2 @@
1
- export { FLOW_JSON_MAX_ARRAY_LENGTH, FLOW_JSON_MAX_BYTES, FLOW_JSON_MAX_COMPONENTS, FLOW_JSON_MAX_DEPTH, FLOW_JSON_MAX_SCREENS, FLOW_JSON_MAX_STRING_LENGTH, FLOW_MAX_CATEGORIES, buildFlowCloseResponse, buildFlowErrorResponse, buildFlowJson, buildFlowScreenResponse, createFlow, deleteFlow, deprecateFlow, getFlow, getFlowAssets, listFlows, publishFlow, updateFlowJson, updateFlowMetadata, validateFlowJson } from "./flows/index";
2
- export type { CreateFlowBody, FlowAssetDetails, FlowAssetsResponse, FlowCategory, FlowCloseResponse, FlowCloseResponseInput, FlowDetails, FlowErrorResponse, FlowErrorResponseInput, FlowJson, FlowListResponse, FlowMutationResponse, FlowScreenResponse, FlowScreenResponseInput, FlowStatus, GetFlowAssetsInput, GetFlowInput, GraphPaging, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./flows/index";
1
+ export { FLOW_JSON_MAX_ARRAY_LENGTH, FLOW_JSON_MAX_BYTES, FLOW_JSON_MAX_COMPONENTS, FLOW_JSON_MAX_DEPTH, FLOW_JSON_MAX_SCREENS, FLOW_JSON_MAX_STRING_LENGTH, FLOW_MAX_CATEGORIES, buildFlowCloseResponse, buildFlowErrorResponse, buildFlowJson, buildFlowScreenResponse, createFlow, deleteFlow, deprecateFlow, getFlow, getFlowAssets, listFlows, publishFlow, updateFlowJson, updateFlowMetadata, validateFlowJson } from "./flows/index.js";
2
+ export type { CreateFlowBody, FlowAssetDetails, FlowAssetsResponse, FlowCategory, FlowCloseResponse, FlowCloseResponseInput, FlowDetails, FlowErrorResponse, FlowErrorResponseInput, FlowJson, FlowListResponse, FlowMutationResponse, FlowScreenResponse, FlowScreenResponseInput, FlowStatus, GetFlowAssetsInput, GetFlowInput, GraphPaging, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./flows/index.js";
@@ -20,4 +20,4 @@ export {
20
20
  updateFlowJson,
21
21
  updateFlowMetadata,
22
22
  validateFlowJson
23
- } from "./flows/index";
23
+ } from "./flows/index.js";
@@ -1,4 +1,4 @@
1
- import type { GraphClient } from "../client";
1
+ import type { GraphClient } from "../client.js";
2
2
  export type MediaOperation = "upload" | "download" | "delete" | "download_bytes" | "decrypt_encrypted" | "create_upload_session" | "upload_file_to_session" | "get_upload_session";
3
3
  export type MediaNotImplementedCode = "not_implemented";
4
4
  export declare class MediaNotImplementedError extends Error {
@@ -1,4 +1,4 @@
1
- import { createGraphApiError } from "../errors";
1
+ import { createGraphApiError } from "../errors.js";
2
2
 
3
3
  export class MediaNotImplementedError extends Error {
4
4
  code;
@@ -1,4 +1,4 @@
1
- import type { GraphRequestOptions } from "../client";
1
+ import type { GraphRequestOptions } from "../client.js";
2
2
  interface GraphRequestExecutor {
3
3
  request<TResponse>(options: GraphRequestOptions): Promise<TResponse>;
4
4
  }
@@ -364,7 +364,7 @@ export declare function buildSendMessagePayload(input: GraphMessagesSendMessageI
364
364
  * control-char rejection, body passthrough, and F-5 error registry
365
365
  * routing are handled uniformly.
366
366
  */
367
- export declare const sendMessage: import("..").EndpointCallable<{
367
+ export declare const sendMessage: import("../endpoint.js").EndpointCallable<{
368
368
  phoneNumberId: string;
369
369
  }, GraphMessagesSendBody, GraphMessagesSendResponse>;
370
370
  export declare class GraphMessagesEndpoint {
@@ -11,8 +11,8 @@ export class GraphMessagesEndpoint {
11
11
  return sendMessage(this.requestExecutor, { phoneNumberId }, buildSendMessagePayload({ ...input, phoneNumberId }));
12
12
  }
13
13
  }
14
- import { defineEndpoint } from "../endpoint";
15
- import { GraphRequestValidationError } from "../errors";
14
+ import { defineEndpoint } from "../endpoint.js";
15
+ import { GraphRequestValidationError } from "../errors.js";
16
16
  export const GRAPH_MESSAGES_TEXT_BODY_MAX_LENGTH = 4096;
17
17
  export const GRAPH_MESSAGES_RECIPIENT_MAX_DIGITS = 15;
18
18
  export const GRAPH_MESSAGES_REPLY_TO_MESSAGE_ID_MAX_LENGTH = 256;
@@ -1,4 +1,4 @@
1
- import type { CreateMessageTemplateBody, TemplateBodyComponentInput, TemplateButtonsComponentInput, TemplateComponent, TemplateFooterComponentInput, TemplateHeaderComponentInput, UpdateMessageTemplateBody } from "./types";
1
+ import type { CreateMessageTemplateBody, TemplateBodyComponentInput, TemplateButtonsComponentInput, TemplateComponent, TemplateFooterComponentInput, TemplateHeaderComponentInput, UpdateMessageTemplateBody } from "./types.js";
2
2
  export declare function buildCreateMessageTemplateBody(input: CreateMessageTemplateBody): Record<string, unknown>;
3
3
  export declare function buildUpdateMessageTemplateBody(input: UpdateMessageTemplateBody): Record<string, unknown>;
4
4
  export declare function buildTemplateHeaderComponent(input: TemplateHeaderComponentInput | TemplateComponent): TemplateComponent;
@@ -9,7 +9,7 @@ import {
9
9
  maybeExample,
10
10
  normalizeComponents,
11
11
  validationError
12
- } from "./shared";
12
+ } from "./shared.js";
13
13
  export function buildCreateMessageTemplateBody(input) {
14
14
  const record = assertPlainRecord(input, "createMessageTemplate");
15
15
  const out = mapCommonBodyFields(record, "createMessageTemplate");
@@ -1,5 +1,5 @@
1
- import type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, ListMessageTemplatesInput, TemplateDetails, TemplateListResponse, TemplateMutationResponse, UpdateMessageTemplateBody } from "./types";
2
- declare const listMessageTemplatesRaw: import("../..").EndpointCallable<{
1
+ import type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, ListMessageTemplatesInput, TemplateDetails, TemplateListResponse, TemplateMutationResponse, UpdateMessageTemplateBody } from "./types.js";
2
+ declare const listMessageTemplatesRaw: import("../../endpoint.js").EndpointCallable<{
3
3
  wabaId: string;
4
4
  fields?: string;
5
5
  status?: string;
@@ -16,7 +16,7 @@ export declare const listMessageTemplates: {
16
16
  (client: Parameters<typeof listMessageTemplatesRaw>[0], params: ListMessageTemplatesInput, body?: never, opts?: Parameters<typeof listMessageTemplatesRaw>[3]): Promise<TemplateListResponse>;
17
17
  readonly definition: typeof listMessageTemplatesRaw.definition;
18
18
  };
19
- declare const getMessageTemplateRaw: import("../..").EndpointCallable<{
19
+ declare const getMessageTemplateRaw: import("../../endpoint.js").EndpointCallable<{
20
20
  templateId: string;
21
21
  fields?: string;
22
22
  }, never, TemplateDetails>;
@@ -24,7 +24,7 @@ export declare const getMessageTemplate: {
24
24
  (client: Parameters<typeof getMessageTemplateRaw>[0], params: GetMessageTemplateInput, body?: never, opts?: Parameters<typeof getMessageTemplateRaw>[3]): Promise<TemplateDetails>;
25
25
  readonly definition: typeof getMessageTemplateRaw.definition;
26
26
  };
27
- declare const createMessageTemplateRaw: import("../..").EndpointCallable<{
27
+ declare const createMessageTemplateRaw: import("../../endpoint.js").EndpointCallable<{
28
28
  wabaId: string;
29
29
  }, CreateMessageTemplateBody, TemplateMutationResponse>;
30
30
  export declare const createMessageTemplate: {
@@ -33,7 +33,7 @@ export declare const createMessageTemplate: {
33
33
  }, body: CreateMessageTemplateBody, opts?: Parameters<typeof createMessageTemplateRaw>[3]): Promise<TemplateMutationResponse>;
34
34
  readonly definition: typeof createMessageTemplateRaw.definition;
35
35
  };
36
- declare const updateMessageTemplateRaw: import("../..").EndpointCallable<{
36
+ declare const updateMessageTemplateRaw: import("../../endpoint.js").EndpointCallable<{
37
37
  templateId: string;
38
38
  }, UpdateMessageTemplateBody, TemplateMutationResponse>;
39
39
  export declare const updateMessageTemplate: {
@@ -42,7 +42,7 @@ export declare const updateMessageTemplate: {
42
42
  }, body: UpdateMessageTemplateBody, opts?: Parameters<typeof updateMessageTemplateRaw>[3]): Promise<TemplateMutationResponse>;
43
43
  readonly definition: typeof updateMessageTemplateRaw.definition;
44
44
  };
45
- declare const deleteMessageTemplateRaw: import("../..").EndpointCallable<{
45
+ declare const deleteMessageTemplateRaw: import("../../endpoint.js").EndpointCallable<{
46
46
  wabaId: string;
47
47
  name: string;
48
48
  hsm_id?: string;
@@ -1,6 +1,6 @@
1
- import { defineEndpoint } from "../../endpoint";
2
- import { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody } from "./builders";
3
- import { assertPlainRecord, assertString } from "./shared";
1
+ import { defineEndpoint } from "../../endpoint.js";
2
+ import { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody } from "./builders.js";
3
+ import { assertPlainRecord, assertString } from "./shared.js";
4
4
  function normalizeListParams(input) {
5
5
  const record = assertPlainRecord(input, "listMessageTemplates");
6
6
  const out = { wabaId: assertString(record.wabaId, "wabaId", "listMessageTemplates") };
@@ -1,5 +1,5 @@
1
- export { createMessageTemplate, deleteMessageTemplate, getMessageTemplate, listMessageTemplates, updateMessageTemplate } from "./callables";
2
- export { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody, buildTemplateBodyComponent, buildTemplateButtonComponent, buildTemplateFooterComponent, buildTemplateHeaderComponent } from "./builders";
3
- export { validateTemplateParameterCounts } from "./validation";
4
- export type { GraphPaging } from "../wabaEndpoints";
5
- export type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, ListMessageTemplatesInput, SendTemplateComponentForValidation, TemplateBodyComponentInput, TemplateButtonInput, TemplateButtonsComponentInput, TemplateButtonType, TemplateCategory, TemplateComponent, TemplateDefinitionForValidation, TemplateDetails, TemplateFooterComponentInput, TemplateHeaderComponentInput, TemplateHeaderFormat, TemplateLanguageCode, TemplateListResponse, TemplateMutationResponse, TemplateParameterFormat, TemplateQualityScore, TemplateStatus, UpdateMessageTemplateBody } from "./types";
1
+ export { createMessageTemplate, deleteMessageTemplate, getMessageTemplate, listMessageTemplates, updateMessageTemplate } from "./callables.js";
2
+ export { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody, buildTemplateBodyComponent, buildTemplateButtonComponent, buildTemplateFooterComponent, buildTemplateHeaderComponent } from "./builders.js";
3
+ export { validateTemplateParameterCounts } from "./validation.js";
4
+ export type { GraphPaging } from "../wabaEndpoints.js";
5
+ export type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, ListMessageTemplatesInput, SendTemplateComponentForValidation, TemplateBodyComponentInput, TemplateButtonInput, TemplateButtonsComponentInput, TemplateButtonType, TemplateCategory, TemplateComponent, TemplateDefinitionForValidation, TemplateDetails, TemplateFooterComponentInput, TemplateHeaderComponentInput, TemplateHeaderFormat, TemplateLanguageCode, TemplateListResponse, TemplateMutationResponse, TemplateParameterFormat, TemplateQualityScore, TemplateStatus, UpdateMessageTemplateBody } from "./types.js";
@@ -4,7 +4,7 @@ export {
4
4
  getMessageTemplate,
5
5
  listMessageTemplates,
6
6
  updateMessageTemplate
7
- } from "./callables";
7
+ } from "./callables.js";
8
8
  export {
9
9
  buildCreateMessageTemplateBody,
10
10
  buildUpdateMessageTemplateBody,
@@ -12,5 +12,5 @@ export {
12
12
  buildTemplateButtonComponent,
13
13
  buildTemplateFooterComponent,
14
14
  buildTemplateHeaderComponent
15
- } from "./builders";
16
- export { validateTemplateParameterCounts } from "./validation";
15
+ } from "./builders.js";
16
+ export { validateTemplateParameterCounts } from "./validation.js";
@@ -1,5 +1,5 @@
1
- import { GraphRequestValidationError } from "../../errors";
2
- import type { TemplateComponent } from "./types";
1
+ import { GraphRequestValidationError } from "../../errors.js";
2
+ import type { TemplateComponent } from "./types.js";
3
3
  export declare const TEMPLATE_NAME_MAX_LENGTH = 512;
4
4
  export declare const TEMPLATE_TEXT_MAX_LENGTH = 4096;
5
5
  export declare const TEMPLATE_SHORT_TEXT_MAX_LENGTH = 1024;
@@ -1,4 +1,4 @@
1
- import { GraphRequestValidationError } from "../../errors";
1
+ import { GraphRequestValidationError } from "../../errors.js";
2
2
  export const TEMPLATE_NAME_MAX_LENGTH = 512;
3
3
  export const TEMPLATE_TEXT_MAX_LENGTH = 4096;
4
4
  export const TEMPLATE_SHORT_TEXT_MAX_LENGTH = 1024;
@@ -1,4 +1,4 @@
1
- import type { GraphPaging } from "../wabaEndpoints";
1
+ import type { GraphPaging } from "../wabaEndpoints.js";
2
2
  export type TemplateCategory = "MARKETING" | "UTILITY" | "AUTHENTICATION";
3
3
  export type TemplateStatus = "APPROVED" | "IN_APPEAL" | "PENDING" | "REJECTED" | "PENDING_DELETION" | "DELETED" | "DISABLED" | "PAUSED" | "LIMIT_EXCEEDED";
4
4
  export type TemplateLanguageCode = string;
@@ -1,2 +1,2 @@
1
- import type { SendTemplateComponentForValidation, TemplateDefinitionForValidation } from "./types";
1
+ import type { SendTemplateComponentForValidation, TemplateDefinitionForValidation } from "./types.js";
2
2
  export declare function validateTemplateParameterCounts(definition: TemplateDefinitionForValidation, sendComponents: readonly SendTemplateComponentForValidation[]): void;
@@ -1,4 +1,4 @@
1
- import { TemplateParamCountMismatchError } from "../../errorSubclasses";
1
+ import { TemplateParamCountMismatchError } from "../../errorSubclasses.js";
2
2
  import {
3
3
  TEMPLATE_MAX_ARRAY,
4
4
  TEMPLATE_MAX_COMPONENTS,
@@ -9,7 +9,7 @@ import {
9
9
  isPlainObject,
10
10
  safeJsonClone,
11
11
  validationError
12
- } from "./shared";
12
+ } from "./shared.js";
13
13
  function mismatchError(message) {
14
14
  return new TemplateParamCountMismatchError({
15
15
  status: 400,
@@ -1,2 +1,2 @@
1
- export { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody, buildTemplateBodyComponent, buildTemplateButtonComponent, buildTemplateFooterComponent, buildTemplateHeaderComponent, createMessageTemplate, deleteMessageTemplate, getMessageTemplate, listMessageTemplates, updateMessageTemplate, validateTemplateParameterCounts } from "./templates/index";
2
- export type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, GraphPaging, ListMessageTemplatesInput, SendTemplateComponentForValidation, TemplateBodyComponentInput, TemplateButtonInput, TemplateButtonsComponentInput, TemplateButtonType, TemplateCategory, TemplateComponent, TemplateDefinitionForValidation, TemplateDetails, TemplateFooterComponentInput, TemplateHeaderComponentInput, TemplateHeaderFormat, TemplateLanguageCode, TemplateListResponse, TemplateMutationResponse, TemplateParameterFormat, TemplateQualityScore, TemplateStatus, UpdateMessageTemplateBody } from "./templates/index";
1
+ export { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody, buildTemplateBodyComponent, buildTemplateButtonComponent, buildTemplateFooterComponent, buildTemplateHeaderComponent, createMessageTemplate, deleteMessageTemplate, getMessageTemplate, listMessageTemplates, updateMessageTemplate, validateTemplateParameterCounts } from "./templates/index.js";
2
+ export type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, GraphPaging, ListMessageTemplatesInput, SendTemplateComponentForValidation, TemplateBodyComponentInput, TemplateButtonInput, TemplateButtonsComponentInput, TemplateButtonType, TemplateCategory, TemplateComponent, TemplateDefinitionForValidation, TemplateDetails, TemplateFooterComponentInput, TemplateHeaderComponentInput, TemplateHeaderFormat, TemplateLanguageCode, TemplateListResponse, TemplateMutationResponse, TemplateParameterFormat, TemplateQualityScore, TemplateStatus, UpdateMessageTemplateBody } from "./templates/index.js";
@@ -11,4 +11,4 @@ export {
11
11
  listMessageTemplates,
12
12
  updateMessageTemplate,
13
13
  validateTemplateParameterCounts
14
- } from "./templates/index";
14
+ } from "./templates/index.js";
@@ -1,4 +1,4 @@
1
- export { listPhoneNumbers } from "./phoneNumbers";
2
- export type { GraphPaging } from "./types";
3
- export type { ListPhoneNumbersInput } from "../businessManagement";
4
- export type { PhoneNumberListEntry, PhoneNumberListResponse } from "./phoneNumbers";
1
+ export { listPhoneNumbers } from "./phoneNumbers.js";
2
+ export type { GraphPaging } from "./types.js";
3
+ export type { ListPhoneNumbersInput } from "../businessManagement.js";
4
+ export type { PhoneNumberListEntry, PhoneNumberListResponse } from "./phoneNumbers.js";
@@ -1 +1 @@
1
- export { listPhoneNumbers } from "./phoneNumbers";
1
+ export { listPhoneNumbers } from "./phoneNumbers.js";
@@ -1,6 +1,6 @@
1
- import type { EndpointInvokeOptions } from "../../endpoint";
2
- import { type ListPhoneNumbersInput } from "../businessManagement";
3
- import type { GraphPaging } from "./types";
1
+ import type { EndpointInvokeOptions } from "../../endpoint.js";
2
+ import { type ListPhoneNumbersInput } from "../businessManagement.js";
3
+ import type { GraphPaging } from "./types.js";
4
4
  export interface PhoneNumberListEntry {
5
5
  readonly id: string;
6
6
  readonly display_phone_number?: string;
@@ -11,7 +11,7 @@ export interface PhoneNumberListResponse {
11
11
  readonly data?: readonly PhoneNumberListEntry[];
12
12
  readonly paging?: GraphPaging;
13
13
  }
14
- declare const listPhoneNumbersRaw: import("../..").EndpointCallable<{
14
+ declare const listPhoneNumbersRaw: import("../../endpoint.js").EndpointCallable<{
15
15
  wabaId: string;
16
16
  fields?: string;
17
17
  limit?: string;
@@ -1,9 +1,9 @@
1
- import { defineEndpoint } from "../../endpoint";
2
- import { GraphRequestValidationError } from "../../errors";
1
+ import { defineEndpoint } from "../../endpoint.js";
2
+ import { GraphRequestValidationError } from "../../errors.js";
3
3
  import {
4
4
  normalizeListPhoneNumbersParams,
5
5
  sanitizeBusinessManagementOptions
6
- } from "../businessManagement";
6
+ } from "../businessManagement.js";
7
7
  const listPhoneNumbersRaw = defineEndpoint({
8
8
  method: "GET",
9
9
  pathTemplate: "/{wabaId}/phone_numbers",
@@ -1,6 +1,6 @@
1
- export { listPhoneNumbers } from "./waba/index";
2
- export type { GraphPaging, PhoneNumberListEntry, PhoneNumberListResponse } from "./waba/index";
3
- export { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody, buildTemplateBodyComponent, buildTemplateButtonComponent, buildTemplateFooterComponent, buildTemplateHeaderComponent, createMessageTemplate, deleteMessageTemplate, getMessageTemplate, listMessageTemplates, updateMessageTemplate, validateTemplateParameterCounts } from "./templates/index";
4
- export type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, ListMessageTemplatesInput, SendTemplateComponentForValidation, TemplateBodyComponentInput, TemplateButtonInput, TemplateButtonsComponentInput, TemplateButtonType, TemplateCategory, TemplateComponent, TemplateDefinitionForValidation, TemplateDetails, TemplateFooterComponentInput, TemplateHeaderComponentInput, TemplateHeaderFormat, TemplateLanguageCode, TemplateListResponse, TemplateMutationResponse, TemplateParameterFormat, TemplateQualityScore, TemplateStatus, UpdateMessageTemplateBody } from "./templates/index";
5
- export { FLOW_JSON_MAX_ARRAY_LENGTH, FLOW_JSON_MAX_BYTES, FLOW_JSON_MAX_COMPONENTS, FLOW_JSON_MAX_DEPTH, FLOW_JSON_MAX_SCREENS, FLOW_JSON_MAX_STRING_LENGTH, FLOW_MAX_CATEGORIES, buildFlowCloseResponse, buildFlowErrorResponse, buildFlowJson, buildFlowScreenResponse, createFlow, deleteFlow, deprecateFlow, getFlow, getFlowAssets, listFlows, publishFlow, updateFlowJson, updateFlowMetadata, validateFlowJson } from "./flows/index";
6
- export type { CreateFlowBody, FlowAssetDetails, FlowAssetsResponse, FlowCategory, FlowCloseResponse, FlowCloseResponseInput, FlowDetails, FlowErrorResponse, FlowErrorResponseInput, FlowJson, FlowListResponse, FlowMutationResponse, FlowScreenResponse, FlowScreenResponseInput, FlowStatus, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./flows/index";
1
+ export { listPhoneNumbers } from "./waba/index.js";
2
+ export type { GraphPaging, PhoneNumberListEntry, PhoneNumberListResponse } from "./waba/index.js";
3
+ export { buildCreateMessageTemplateBody, buildUpdateMessageTemplateBody, buildTemplateBodyComponent, buildTemplateButtonComponent, buildTemplateFooterComponent, buildTemplateHeaderComponent, createMessageTemplate, deleteMessageTemplate, getMessageTemplate, listMessageTemplates, updateMessageTemplate, validateTemplateParameterCounts } from "./templates/index.js";
4
+ export type { CreateMessageTemplateBody, DeleteMessageTemplateInput, GetMessageTemplateInput, ListMessageTemplatesInput, SendTemplateComponentForValidation, TemplateBodyComponentInput, TemplateButtonInput, TemplateButtonsComponentInput, TemplateButtonType, TemplateCategory, TemplateComponent, TemplateDefinitionForValidation, TemplateDetails, TemplateFooterComponentInput, TemplateHeaderComponentInput, TemplateHeaderFormat, TemplateLanguageCode, TemplateListResponse, TemplateMutationResponse, TemplateParameterFormat, TemplateQualityScore, TemplateStatus, UpdateMessageTemplateBody } from "./templates/index.js";
5
+ export { FLOW_JSON_MAX_ARRAY_LENGTH, FLOW_JSON_MAX_BYTES, FLOW_JSON_MAX_COMPONENTS, FLOW_JSON_MAX_DEPTH, FLOW_JSON_MAX_SCREENS, FLOW_JSON_MAX_STRING_LENGTH, FLOW_MAX_CATEGORIES, buildFlowCloseResponse, buildFlowErrorResponse, buildFlowJson, buildFlowScreenResponse, createFlow, deleteFlow, deprecateFlow, getFlow, getFlowAssets, listFlows, publishFlow, updateFlowJson, updateFlowMetadata, validateFlowJson } from "./flows/index.js";
6
+ export type { CreateFlowBody, FlowAssetDetails, FlowAssetsResponse, FlowCategory, FlowCloseResponse, FlowCloseResponseInput, FlowDetails, FlowErrorResponse, FlowErrorResponseInput, FlowJson, FlowListResponse, FlowMutationResponse, FlowScreenResponse, FlowScreenResponseInput, FlowStatus, GetFlowAssetsInput, GetFlowInput, ListFlowsInput, UpdateFlowJsonBody, UpdateFlowMetadataBody } from "./flows/index.js";
@@ -1,4 +1,4 @@
1
- export { listPhoneNumbers } from "./waba/index";
1
+ export { listPhoneNumbers } from "./waba/index.js";
2
2
  export {
3
3
  buildCreateMessageTemplateBody,
4
4
  buildUpdateMessageTemplateBody,
@@ -12,7 +12,7 @@ export {
12
12
  listMessageTemplates,
13
13
  updateMessageTemplate,
14
14
  validateTemplateParameterCounts
15
- } from "./templates/index";
15
+ } from "./templates/index.js";
16
16
  export {
17
17
  FLOW_JSON_MAX_ARRAY_LENGTH,
18
18
  FLOW_JSON_MAX_BYTES,
@@ -35,4 +35,4 @@ export {
35
35
  updateFlowJson,
36
36
  updateFlowMetadata,
37
37
  validateFlowJson
38
- } from "./flows/index";
38
+ } from "./flows/index.js";
@@ -1,4 +1,4 @@
1
- import type { GraphApiError, GraphApiErrorPayload } from "./errors";
1
+ import type { GraphApiError, GraphApiErrorPayload } from "./errors.js";
2
2
  export interface GraphErrorFactoryContext {
3
3
  readonly payload: GraphApiErrorPayload | undefined;
4
4
  readonly status: number;
@@ -1,5 +1,5 @@
1
- import { GraphApiError, GraphAuthError, GraphRateLimitError } from "./errors";
2
- import { type GraphErrorFactoryContext } from "./errorRegistry";
1
+ import { GraphApiError, GraphAuthError, GraphRateLimitError } from "./errors.js";
2
+ import { type GraphErrorFactoryContext } from "./errorRegistry.js";
3
3
  export declare class AuthException extends GraphAuthError {
4
4
  static readonly errorCode: 0;
5
5
  constructor(ctx: GraphErrorFactoryContext);
@@ -2,12 +2,12 @@ import {
2
2
  GraphApiError,
3
3
  GraphAuthError,
4
4
  GraphRateLimitError
5
- } from "./errors";
5
+ } from "./errors.js";
6
6
  import {
7
7
  isBuiltInRegistered,
8
8
  markBuiltInRegistered,
9
9
  registerErrorCode
10
- } from "./errorRegistry";
10
+ } from "./errorRegistry.js";
11
11
  function messageOf(ctx, fallback) {
12
12
  const payload = ctx.payload;
13
13
  if (payload !== undefined && typeof payload.message === "string" && payload.message.length > 0) {
package/dist/errors.js CHANGED
@@ -244,7 +244,7 @@ export function createGraphApiError(params) {
244
244
  }
245
245
  return new GraphApiError(ctorParams);
246
246
  }
247
- import { resolveRegisteredError as _resolveRegisteredError } from "./errorRegistry";
247
+ import { resolveRegisteredError as _resolveRegisteredError } from "./errorRegistry.js";
248
248
  function resolveRegisteredErrorSafely(code, subcode) {
249
249
  return _resolveRegisteredError(code, subcode);
250
250
  }
package/dist/index.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export * from "./client";
2
- export * from "./errors";
3
- export * from "./errorRegistry";
4
- export * from "./errorSubclasses";
5
- export * from "./endpoints/messages";
6
- export * from "./endpoints/calling";
7
- export * from "./endpoints/businessManagement";
8
- export * from "./endpoints/wabaEndpoints";
9
- export * from "./endpoint";
10
- export { PhoneNumberClient, validatePhoneNumberClientConfig } from "./subclients/phoneNumberClient";
11
- export type { PhoneNumberClientConfig } from "./subclients/phoneNumberClient";
12
- export { WABAClient, validateWABAClientConfig } from "./subclients/wabaClient";
13
- export type { WABAClientConfig } from "./subclients/wabaClient";
14
- export * from "./transport";
15
- export { createFetchTransport } from "./createFetchTransport";
16
- export type { CreateFetchTransportOptions } from "./createFetchTransport";
17
- export { paginate, paginateAll, PaginationError } from "./pagination";
18
- export type { PaginationOptions, PaginatedResult, PaginatedPage, PaginationErrorCode } from "./pagination";
19
- export { uploadMedia, downloadMedia, deleteMedia, downloadMediaBytes, decryptEncryptedMedia, createUploadSession, uploadFileToSession, getUploadSession, MediaNotImplementedError, MediaValidationError, MediaCryptoError, MediaIntegrityError, DEFAULT_MAX_MEDIA_UPLOAD_BYTES, MAX_MEDIA_UPLOAD_BYTES, DEFAULT_MAX_MEDIA_DOWNLOAD_BYTES, MAX_MEDIA_DOWNLOAD_BYTES, DEFAULT_MAX_UPLOAD_SESSION_BYTES, MAX_UPLOAD_SESSION_BYTES, MEDIA_LINEAR_ISSUE_UPLOAD, MEDIA_LINEAR_ISSUE_DOWNLOAD, MEDIA_LINEAR_ISSUE_DELETE, MEDIA_LINEAR_ISSUE_DECRYPT } from "./endpoints/media";
20
- export type { MediaOperation, MediaNotImplementedCode, MediaValidationErrorCode, MediaCryptoErrorCode, MediaIntegrityErrorCode, MediaUploadBody, MediaUploadOptions, MediaUploadResponse, MediaDownloadOptions, MediaDownloadResponse, MediaDeleteOptions, MediaDeleteResponse, MediaDownloadBytesOptions, MediaDownloadBytesResponse, EncryptedMediaBundle, CreateUploadSessionParams, UploadSessionOptions, CreateUploadSessionResponse, UploadFileToSessionParams, UploadFileToSessionResponse, GetUploadSessionParams, GetUploadSessionResponse } from "./endpoints/media";
1
+ export * from "./client.js";
2
+ export * from "./errors.js";
3
+ export * from "./errorRegistry.js";
4
+ export * from "./errorSubclasses.js";
5
+ export * from "./endpoints/messages.js";
6
+ export * from "./endpoints/calling.js";
7
+ export * from "./endpoints/businessManagement.js";
8
+ export * from "./endpoints/wabaEndpoints.js";
9
+ export * from "./endpoint.js";
10
+ export { PhoneNumberClient, validatePhoneNumberClientConfig } from "./subclients/phoneNumberClient.js";
11
+ export type { PhoneNumberClientConfig } from "./subclients/phoneNumberClient.js";
12
+ export { WABAClient, validateWABAClientConfig } from "./subclients/wabaClient.js";
13
+ export type { WABAClientConfig } from "./subclients/wabaClient.js";
14
+ export * from "./transport.js";
15
+ export { createFetchTransport } from "./createFetchTransport.js";
16
+ export type { CreateFetchTransportOptions } from "./createFetchTransport.js";
17
+ export { paginate, paginateAll, PaginationError } from "./pagination.js";
18
+ export type { PaginationOptions, PaginatedResult, PaginatedPage, PaginationErrorCode } from "./pagination.js";
19
+ export { uploadMedia, downloadMedia, deleteMedia, downloadMediaBytes, decryptEncryptedMedia, createUploadSession, uploadFileToSession, getUploadSession, MediaNotImplementedError, MediaValidationError, MediaCryptoError, MediaIntegrityError, DEFAULT_MAX_MEDIA_UPLOAD_BYTES, MAX_MEDIA_UPLOAD_BYTES, DEFAULT_MAX_MEDIA_DOWNLOAD_BYTES, MAX_MEDIA_DOWNLOAD_BYTES, DEFAULT_MAX_UPLOAD_SESSION_BYTES, MAX_UPLOAD_SESSION_BYTES, MEDIA_LINEAR_ISSUE_UPLOAD, MEDIA_LINEAR_ISSUE_DOWNLOAD, MEDIA_LINEAR_ISSUE_DELETE, MEDIA_LINEAR_ISSUE_DECRYPT } from "./endpoints/media.js";
20
+ export type { MediaOperation, MediaNotImplementedCode, MediaValidationErrorCode, MediaCryptoErrorCode, MediaIntegrityErrorCode, MediaUploadBody, MediaUploadOptions, MediaUploadResponse, MediaDownloadOptions, MediaDownloadResponse, MediaDeleteOptions, MediaDeleteResponse, MediaDownloadBytesOptions, MediaDownloadBytesResponse, EncryptedMediaBundle, CreateUploadSessionParams, UploadSessionOptions, CreateUploadSessionResponse, UploadFileToSessionParams, UploadFileToSessionResponse, GetUploadSessionParams, GetUploadSessionResponse } from "./endpoints/media.js";
package/dist/index.js CHANGED
@@ -1,27 +1,27 @@
1
- export * from "./client";
2
- export * from "./errors";
3
- export * from "./errorRegistry";
4
- export * from "./errorSubclasses";
5
- export * from "./endpoints/messages";
6
- export * from "./endpoints/calling";
7
- export * from "./endpoints/businessManagement";
8
- export * from "./endpoints/wabaEndpoints";
9
- export * from "./endpoint";
1
+ export * from "./client.js";
2
+ export * from "./errors.js";
3
+ export * from "./errorRegistry.js";
4
+ export * from "./errorSubclasses.js";
5
+ export * from "./endpoints/messages.js";
6
+ export * from "./endpoints/calling.js";
7
+ export * from "./endpoints/businessManagement.js";
8
+ export * from "./endpoints/wabaEndpoints.js";
9
+ export * from "./endpoint.js";
10
10
  export {
11
11
  PhoneNumberClient,
12
12
  validatePhoneNumberClientConfig
13
- } from "./subclients/phoneNumberClient";
13
+ } from "./subclients/phoneNumberClient.js";
14
14
  export {
15
15
  WABAClient,
16
16
  validateWABAClientConfig
17
- } from "./subclients/wabaClient";
18
- export * from "./transport";
19
- export { createFetchTransport } from "./createFetchTransport";
17
+ } from "./subclients/wabaClient.js";
18
+ export * from "./transport.js";
19
+ export { createFetchTransport } from "./createFetchTransport.js";
20
20
  export {
21
21
  paginate,
22
22
  paginateAll,
23
23
  PaginationError
24
- } from "./pagination";
24
+ } from "./pagination.js";
25
25
  export {
26
26
  uploadMedia,
27
27
  downloadMedia,
@@ -45,4 +45,4 @@ export {
45
45
  MEDIA_LINEAR_ISSUE_DOWNLOAD,
46
46
  MEDIA_LINEAR_ISSUE_DELETE,
47
47
  MEDIA_LINEAR_ISSUE_DECRYPT
48
- } from "./endpoints/media";
48
+ } from "./endpoints/media.js";
@@ -1,5 +1,5 @@
1
- import { graphValidationError, wrapGraphValidation } from "./errors";
2
- import { assertQueryString } from "./strings";
1
+ import { graphValidationError, wrapGraphValidation } from "./errors.js";
2
+ import { assertQueryString } from "./strings.js";
3
3
  function isUnsafePrototypeKey(key) {
4
4
  return key === "__proto__" || key === "constructor" || key === "prototype";
5
5
  }
@@ -1,3 +1,3 @@
1
- import { GraphRequestValidationError } from "../../errors";
1
+ import { GraphRequestValidationError } from "../../errors.js";
2
2
  export declare function graphValidationError(message: string, cause?: unknown): GraphRequestValidationError;
3
3
  export declare function wrapGraphValidation<T>(message: string, fn: () => T): T;
@@ -1,4 +1,4 @@
1
- import { GraphRequestValidationError } from "../../errors";
1
+ import { GraphRequestValidationError } from "../../errors.js";
2
2
  export function graphValidationError(message, cause) {
3
3
  return new GraphRequestValidationError(message, cause);
4
4
  }
@@ -1,6 +1,6 @@
1
- import { graphValidationError, wrapGraphValidation } from "./errors";
2
- import { hasAsciiControlChar } from "./strings";
3
- import { isUnsafePrototypeKey } from "./records";
1
+ import { graphValidationError, wrapGraphValidation } from "./errors.js";
2
+ import { hasAsciiControlChar } from "./strings.js";
3
+ import { isUnsafePrototypeKey } from "./records.js";
4
4
  function invalidTypeMessage(opts) {
5
5
  return opts.invalidTypeMessage ?? `Invalid ${opts.helperName} input: ${opts.path} must be a plain object.`;
6
6
  }
@@ -1,8 +1,8 @@
1
- export * from "./arrays";
2
- export * from "./errors";
3
- export * from "./headers";
4
- export * from "./json";
5
- export * from "./options";
6
- export * from "./paths";
7
- export * from "./records";
8
- export * from "./strings";
1
+ export * from "./arrays.js";
2
+ export * from "./errors.js";
3
+ export * from "./headers.js";
4
+ export * from "./json.js";
5
+ export * from "./options.js";
6
+ export * from "./paths.js";
7
+ export * from "./records.js";
8
+ export * from "./strings.js";
@@ -1,8 +1,8 @@
1
- export * from "./arrays";
2
- export * from "./errors";
3
- export * from "./headers";
4
- export * from "./json";
5
- export * from "./options";
6
- export * from "./paths";
7
- export * from "./records";
8
- export * from "./strings";
1
+ export * from "./arrays.js";
2
+ export * from "./errors.js";
3
+ export * from "./headers.js";
4
+ export * from "./json.js";
5
+ export * from "./options.js";
6
+ export * from "./paths.js";
7
+ export * from "./records.js";
8
+ export * from "./strings.js";
@@ -1,7 +1,7 @@
1
- import { assertDenseDataArray } from "./arrays";
2
- import { graphValidationError, wrapGraphValidation } from "./errors";
3
- import { assertPlainDataRecord } from "./records";
4
- import { hasAsciiControlChar } from "./strings";
1
+ import { assertDenseDataArray } from "./arrays.js";
2
+ import { graphValidationError, wrapGraphValidation } from "./errors.js";
3
+ import { assertPlainDataRecord } from "./records.js";
4
+ import { hasAsciiControlChar } from "./strings.js";
5
5
  function childPath(path, key) {
6
6
  return /^[A-Za-z_$][A-Za-z0-9_$]*$/u.test(key) ? `${path}.${key}` : `${path}[${JSON.stringify(key)}]`;
7
7
  }
@@ -1,5 +1,5 @@
1
- import { graphValidationError, wrapGraphValidation } from "./errors";
2
- import { assertPlainDataRecord } from "./records";
1
+ import { graphValidationError, wrapGraphValidation } from "./errors.js";
2
+ import { assertPlainDataRecord } from "./records.js";
3
3
  export function copyOptionalParamsObject(params, helperName) {
4
4
  if (params === undefined)
5
5
  return {};
@@ -1,5 +1,5 @@
1
- import { graphValidationError } from "./errors";
2
- import { assertBoundedString, hasAsciiControlChar } from "./strings";
1
+ import { graphValidationError } from "./errors.js";
2
+ import { assertBoundedString, hasAsciiControlChar } from "./strings.js";
3
3
  function assertSafePathSegmentString(value, opts) {
4
4
  if (hasAsciiControlChar(value)) {
5
5
  throw graphValidationError(`Invalid ${opts.helperName} input: ${opts.fieldName} must not contain control characters.`);
@@ -1,5 +1,5 @@
1
- import { graphValidationError, wrapGraphValidation } from "./errors";
2
- import { hasAsciiControlChar } from "./strings";
1
+ import { graphValidationError, wrapGraphValidation } from "./errors.js";
2
+ import { hasAsciiControlChar } from "./strings.js";
3
3
  export function isUnsafePrototypeKey(key) {
4
4
  return key === "__proto__" || key === "constructor" || key === "prototype";
5
5
  }
@@ -1,4 +1,4 @@
1
- import { graphValidationError } from "./errors";
1
+ import { graphValidationError } from "./errors.js";
2
2
  export function hasAsciiControlChar(value) {
3
3
  for (let index = 0;index < value.length; index += 1) {
4
4
  const code = value.charCodeAt(index);
@@ -1,5 +1,5 @@
1
- import type { EndpointCallable } from "./endpoint";
2
- import type { GraphClient } from "./client";
1
+ import type { EndpointCallable } from "./endpoint.js";
2
+ import type { GraphClient } from "./client.js";
3
3
  export interface PaginationOptions {
4
4
  readonly maxPages?: number;
5
5
  readonly pageSize?: number;
@@ -1,8 +1,8 @@
1
- import type { GraphClient } from "../client";
2
- import type { EndpointInvokeOptions } from "../endpoint";
3
- import { type BusinessProfileResponse, type CommerceSettingsResponse, type GetBusinessProfileInput, type GetCommerceSettingsInput, type GetPhoneNumberInfoInput, type GetPhoneNumberSettingsInput, type PhoneNumberInfo, type PhoneNumberSettingsResponse } from "../endpoints/businessManagement";
4
- import { type AcceptCallRequest, type CallLifecycleResponse, type InitiateCallRequest, type PreAcceptCallRequest, type RejectCallRequest, type TerminateCallRequest } from "../endpoints/calling";
5
- import { type GraphMessagesMarkMessageAsReadInput, type GraphMessagesRemoveReactionInput, type GraphMessagesRequestLocationInput, type GraphMessagesSendAudioInput, type GraphMessagesSendBody, type GraphMessagesSendButtonsInput, type GraphMessagesSendCatalogInput, type GraphMessagesSendContactsInput, type GraphMessagesSendCtaUrlInput, type GraphMessagesSendDocumentInput, type GraphMessagesSendImageInput, type GraphMessagesSendListInput, type GraphMessagesSendLocationInput, type GraphMessagesSendProductInput, type GraphMessagesSendProductsInput, type GraphMessagesSendReactionInput, type GraphMessagesSendResponse, type GraphMessagesSendStickerInput, type GraphMessagesSendTemplateInput, type GraphMessagesSendTextInput, type GraphMessagesSendVideoInput, type GraphMessagesTypingIndicatorInput } from "../endpoints/messages";
1
+ import type { GraphClient } from "../client.js";
2
+ import type { EndpointInvokeOptions } from "../endpoint.js";
3
+ import { type BusinessProfileResponse, type CommerceSettingsResponse, type GetBusinessProfileInput, type GetCommerceSettingsInput, type GetPhoneNumberInfoInput, type GetPhoneNumberSettingsInput, type PhoneNumberInfo, type PhoneNumberSettingsResponse } from "../endpoints/businessManagement.js";
4
+ import { type AcceptCallRequest, type CallLifecycleResponse, type InitiateCallRequest, type PreAcceptCallRequest, type RejectCallRequest, type TerminateCallRequest } from "../endpoints/calling.js";
5
+ import { type GraphMessagesMarkMessageAsReadInput, type GraphMessagesRemoveReactionInput, type GraphMessagesRequestLocationInput, type GraphMessagesSendAudioInput, type GraphMessagesSendBody, type GraphMessagesSendButtonsInput, type GraphMessagesSendCatalogInput, type GraphMessagesSendContactsInput, type GraphMessagesSendCtaUrlInput, type GraphMessagesSendDocumentInput, type GraphMessagesSendImageInput, type GraphMessagesSendListInput, type GraphMessagesSendLocationInput, type GraphMessagesSendProductInput, type GraphMessagesSendProductsInput, type GraphMessagesSendReactionInput, type GraphMessagesSendResponse, type GraphMessagesSendStickerInput, type GraphMessagesSendTemplateInput, type GraphMessagesSendTextInput, type GraphMessagesSendVideoInput, type GraphMessagesTypingIndicatorInput } from "../endpoints/messages.js";
6
6
  export interface PhoneNumberClientConfig {
7
7
  readonly graphClient: GraphClient;
8
8
  readonly phoneNumberId: string;
@@ -111,22 +111,22 @@ export class PhoneNumberClient {
111
111
  return terminateCallEndpoint(this.#graphClient, { phoneNumberId: this.#phoneNumberId }, input, opts);
112
112
  }
113
113
  }
114
- import { assertSafePathParamValue } from "../endpoint";
115
- import { GraphRequestValidationError } from "../errors";
116
- import { copyOptionalParamsObject } from "../internal/validation/options";
114
+ import { assertSafePathParamValue } from "../endpoint.js";
115
+ import { GraphRequestValidationError } from "../errors.js";
116
+ import { copyOptionalParamsObject } from "../internal/validation/options.js";
117
117
  import {
118
118
  getBusinessProfile as getBusinessProfileEndpoint,
119
119
  getCommerceSettings as getCommerceSettingsEndpoint,
120
120
  getPhoneNumberInfo as getPhoneNumberInfoEndpoint,
121
121
  getPhoneNumberSettings as getPhoneNumberSettingsEndpoint
122
- } from "../endpoints/businessManagement";
122
+ } from "../endpoints/businessManagement.js";
123
123
  import {
124
124
  acceptCall as acceptCallEndpoint,
125
125
  initiateCall as initiateCallEndpoint,
126
126
  preAcceptCall as preAcceptCallEndpoint,
127
127
  rejectCall as rejectCallEndpoint,
128
128
  terminateCall as terminateCallEndpoint
129
- } from "../endpoints/calling";
129
+ } from "../endpoints/calling.js";
130
130
  import {
131
131
  buildMarkMessageAsReadPayload,
132
132
  buildRemoveReactionPayload,
@@ -149,7 +149,7 @@ import {
149
149
  buildSendVideoPayload,
150
150
  buildTypingIndicatorPayload,
151
151
  sendMessage as sendMessageEndpoint
152
- } from "../endpoints/messages";
152
+ } from "../endpoints/messages.js";
153
153
  function hasRequestMethod(candidate) {
154
154
  if (candidate === null || typeof candidate !== "object") {
155
155
  return false;
@@ -1,8 +1,8 @@
1
- import type { GraphClient } from "../client";
2
- import type { EndpointInvokeOptions } from "../endpoint";
3
- import { type GetWabaInfoInput, type SubscribedAppsResponse, type WabaInfo } from "../endpoints/businessManagement";
4
- import { type ListPhoneNumbersInput, type PhoneNumberListResponse } from "../endpoints/waba";
5
- import { type CreateFlowBody, type CreateMessageTemplateBody, type DeleteMessageTemplateInput, type FlowAssetsResponse, type FlowDetails, type FlowListResponse, type FlowMutationResponse, type GetFlowAssetsInput, type GetFlowInput, type GetMessageTemplateInput, type ListFlowsInput, type ListMessageTemplatesInput, type TemplateDetails, type TemplateListResponse, type TemplateMutationResponse, type UpdateFlowJsonBody, type UpdateFlowMetadataBody, type UpdateMessageTemplateBody } from "../endpoints/wabaEndpoints";
1
+ import type { GraphClient } from "../client.js";
2
+ import type { EndpointInvokeOptions } from "../endpoint.js";
3
+ import { type GetWabaInfoInput, type SubscribedAppsResponse, type WabaInfo } from "../endpoints/businessManagement.js";
4
+ import { type ListPhoneNumbersInput, type PhoneNumberListResponse } from "../endpoints/waba/index.js";
5
+ import { type CreateFlowBody, type CreateMessageTemplateBody, type DeleteMessageTemplateInput, type FlowAssetsResponse, type FlowDetails, type FlowListResponse, type FlowMutationResponse, type GetFlowAssetsInput, type GetFlowInput, type GetMessageTemplateInput, type ListFlowsInput, type ListMessageTemplatesInput, type TemplateDetails, type TemplateListResponse, type TemplateMutationResponse, type UpdateFlowJsonBody, type UpdateFlowMetadataBody, type UpdateMessageTemplateBody } from "../endpoints/wabaEndpoints.js";
6
6
  export interface WABAClientConfig {
7
7
  readonly graphClient: GraphClient;
8
8
  readonly wabaId: string;
@@ -106,16 +106,16 @@ export class WABAClient {
106
106
  return getFlowAssetsEndpoint(this.#graphClient, { flowId, ...rest }, undefined, opts);
107
107
  }
108
108
  }
109
- import { assertSafePathParamValue } from "../endpoint";
110
- import { GraphRequestValidationError } from "../errors";
111
- import { copyOptionalParamsObject, splitRequiredStringDataProp } from "../internal/validation/options";
109
+ import { assertSafePathParamValue } from "../endpoint.js";
110
+ import { GraphRequestValidationError } from "../errors.js";
111
+ import { copyOptionalParamsObject, splitRequiredStringDataProp } from "../internal/validation/options.js";
112
112
  import {
113
113
  getWabaInfo as getWabaInfoEndpoint,
114
114
  listSubscribedApps as listSubscribedAppsEndpoint
115
- } from "../endpoints/businessManagement";
115
+ } from "../endpoints/businessManagement.js";
116
116
  import {
117
117
  listPhoneNumbers as listPhoneNumbersEndpoint
118
- } from "../endpoints/waba";
118
+ } from "../endpoints/waba/index.js";
119
119
  import {
120
120
  createMessageTemplate as createMessageTemplateEndpoint,
121
121
  deleteMessageTemplate as deleteMessageTemplateEndpoint,
@@ -131,7 +131,7 @@ import {
131
131
  deleteFlow as deleteFlowEndpoint,
132
132
  deprecateFlow as deprecateFlowEndpoint,
133
133
  getFlowAssets as getFlowAssetsEndpoint
134
- } from "../endpoints/wabaEndpoints";
134
+ } from "../endpoints/wabaEndpoints.js";
135
135
  function hasRequestMethod(candidate) {
136
136
  if (candidate === null || typeof candidate !== "object") {
137
137
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wats/graph",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",