@surgeapi/node 0.40.0 → 0.42.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.
Files changed (74) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +4 -1
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/env.js +2 -2
  11. package/internal/utils/env.js.map +1 -1
  12. package/internal/utils/env.mjs +2 -2
  13. package/internal/utils/env.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/attachments.d.mts +31 -0
  16. package/resources/attachments.d.mts.map +1 -0
  17. package/resources/attachments.d.ts +31 -0
  18. package/resources/attachments.d.ts.map +1 -0
  19. package/resources/attachments.js +24 -0
  20. package/resources/attachments.js.map +1 -0
  21. package/resources/attachments.mjs +20 -0
  22. package/resources/attachments.mjs.map +1 -0
  23. package/resources/audiences.d.mts +32 -1
  24. package/resources/audiences.d.mts.map +1 -1
  25. package/resources/audiences.d.ts +32 -1
  26. package/resources/audiences.d.ts.map +1 -1
  27. package/resources/audiences.js +14 -0
  28. package/resources/audiences.js.map +1 -1
  29. package/resources/audiences.mjs +14 -0
  30. package/resources/audiences.mjs.map +1 -1
  31. package/resources/campaigns.d.mts +146 -2
  32. package/resources/campaigns.d.mts.map +1 -1
  33. package/resources/campaigns.d.ts +146 -2
  34. package/resources/campaigns.d.ts.map +1 -1
  35. package/resources/campaigns.js +38 -0
  36. package/resources/campaigns.js.map +1 -1
  37. package/resources/campaigns.mjs +38 -0
  38. package/resources/campaigns.mjs.map +1 -1
  39. package/resources/index.d.mts +3 -2
  40. package/resources/index.d.mts.map +1 -1
  41. package/resources/index.d.ts +3 -2
  42. package/resources/index.d.ts.map +1 -1
  43. package/resources/index.js +3 -1
  44. package/resources/index.js.map +1 -1
  45. package/resources/index.mjs +2 -1
  46. package/resources/index.mjs.map +1 -1
  47. package/resources/messages.d.mts +4 -0
  48. package/resources/messages.d.mts.map +1 -1
  49. package/resources/messages.d.ts +4 -0
  50. package/resources/messages.d.ts.map +1 -1
  51. package/resources/phone-numbers.d.mts +9 -0
  52. package/resources/phone-numbers.d.mts.map +1 -1
  53. package/resources/phone-numbers.d.ts +9 -0
  54. package/resources/phone-numbers.d.ts.map +1 -1
  55. package/resources/webhooks.d.mts +11 -2
  56. package/resources/webhooks.d.mts.map +1 -1
  57. package/resources/webhooks.d.ts +11 -2
  58. package/resources/webhooks.d.ts.map +1 -1
  59. package/resources/webhooks.js.map +1 -1
  60. package/resources/webhooks.mjs.map +1 -1
  61. package/src/client.ts +16 -1
  62. package/src/internal/utils/env.ts +2 -2
  63. package/src/resources/attachments.ts +38 -0
  64. package/src/resources/audiences.ts +43 -0
  65. package/src/resources/campaigns.ts +173 -1
  66. package/src/resources/index.ts +9 -1
  67. package/src/resources/messages.ts +5 -0
  68. package/src/resources/phone-numbers.ts +11 -0
  69. package/src/resources/webhooks.ts +13 -2
  70. package/src/version.ts +1 -1
  71. package/version.d.mts +1 -1
  72. package/version.d.ts +1 -1
  73. package/version.js +1 -1
  74. package/version.mjs +1 -1
@@ -5,6 +5,18 @@ import { APIPromise } from "../core/api-promise.mjs";
5
5
  import { type CursorParams, PagePromise } from "../core/pagination.mjs";
6
6
  import { RequestOptions } from "../internal/request-options.mjs";
7
7
  export declare class Audiences extends APIResource {
8
+ /**
9
+ * Creates a new audience.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const audience = await client.audiences.create(
14
+ * 'acct_01j9a43avnfqzbjfch6pygv1td',
15
+ * { name: 'The Family' },
16
+ * );
17
+ * ```
18
+ */
19
+ create(accountID: string, body: AudienceCreateParams, options?: RequestOptions): APIPromise<AudienceCreateResponse>;
8
20
  /**
9
21
  * Adds an existing contact to a manual audience.
10
22
  *
@@ -33,6 +45,25 @@ export declare class Audiences extends APIResource {
33
45
  */
34
46
  listContacts(audienceID: string, query?: AudienceListContactsParams | null | undefined, options?: RequestOptions): PagePromise<ContactsCursor, ContactsAPI.Contact>;
35
47
  }
48
+ /**
49
+ * A group of contacts used for targeting messages.
50
+ */
51
+ export interface AudienceCreateResponse {
52
+ /**
53
+ * Unique identifier for the object.
54
+ */
55
+ id: string;
56
+ /**
57
+ * A name to identify this Audience. This name will only be visible within Surge.
58
+ */
59
+ name: string;
60
+ }
61
+ export interface AudienceCreateParams {
62
+ /**
63
+ * The audience name.
64
+ */
65
+ name: string;
66
+ }
36
67
  export interface AudienceAddContactParams {
37
68
  /**
38
69
  * The ID of the contact to add. The contact must belong to the same account as the
@@ -43,7 +74,7 @@ export interface AudienceAddContactParams {
43
74
  export interface AudienceListContactsParams extends CursorParams {
44
75
  }
45
76
  export declare namespace Audiences {
46
- export { type AudienceAddContactParams as AudienceAddContactParams, type AudienceListContactsParams as AudienceListContactsParams, };
77
+ export { type AudienceCreateResponse as AudienceCreateResponse, type AudienceCreateParams as AudienceCreateParams, type AudienceAddContactParams as AudienceAddContactParams, type AudienceListContactsParams as AudienceListContactsParams, };
47
78
  }
48
79
  export { type ContactsCursor };
49
80
  //# sourceMappingURL=audiences.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audiences.d.mts","sourceRoot":"","sources":["../src/resources/audiences.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,cAAc,EAAE;OAClB,EAAE,UAAU,EAAE;OACd,EAAU,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,UAAU,CACR,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC;IAIlC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAC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AMpD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,0BAA2B,SAAQ,YAAY;CAAG;AAEnE,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH;AAED,OAAO,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -5,6 +5,18 @@ import { APIPromise } from "../core/api-promise.js";
5
5
  import { type CursorParams, PagePromise } from "../core/pagination.js";
6
6
  import { RequestOptions } from "../internal/request-options.js";
7
7
  export declare class Audiences extends APIResource {
8
+ /**
9
+ * Creates a new audience.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const audience = await client.audiences.create(
14
+ * 'acct_01j9a43avnfqzbjfch6pygv1td',
15
+ * { name: 'The Family' },
16
+ * );
17
+ * ```
18
+ */
19
+ create(accountID: string, body: AudienceCreateParams, options?: RequestOptions): APIPromise<AudienceCreateResponse>;
8
20
  /**
9
21
  * Adds an existing contact to a manual audience.
10
22
  *
@@ -33,6 +45,25 @@ export declare class Audiences extends APIResource {
33
45
  */
34
46
  listContacts(audienceID: string, query?: AudienceListContactsParams | null | undefined, options?: RequestOptions): PagePromise<ContactsCursor, ContactsAPI.Contact>;
35
47
  }
48
+ /**
49
+ * A group of contacts used for targeting messages.
50
+ */
51
+ export interface AudienceCreateResponse {
52
+ /**
53
+ * Unique identifier for the object.
54
+ */
55
+ id: string;
56
+ /**
57
+ * A name to identify this Audience. This name will only be visible within Surge.
58
+ */
59
+ name: string;
60
+ }
61
+ export interface AudienceCreateParams {
62
+ /**
63
+ * The audience name.
64
+ */
65
+ name: string;
66
+ }
36
67
  export interface AudienceAddContactParams {
37
68
  /**
38
69
  * The ID of the contact to add. The contact must belong to the same account as the
@@ -43,7 +74,7 @@ export interface AudienceAddContactParams {
43
74
  export interface AudienceListContactsParams extends CursorParams {
44
75
  }
45
76
  export declare namespace Audiences {
46
- export { type AudienceAddContactParams as AudienceAddContactParams, type AudienceListContactsParams as AudienceListContactsParams, };
77
+ export { type AudienceCreateResponse as AudienceCreateResponse, type AudienceCreateParams as AudienceCreateParams, type AudienceAddContactParams as AudienceAddContactParams, type AudienceListContactsParams as AudienceListContactsParams, };
47
78
  }
48
79
  export { type ContactsCursor };
49
80
  //# sourceMappingURL=audiences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audiences.d.ts","sourceRoot":"","sources":["../src/resources/audiences.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,cAAc,EAAE;OAClB,EAAE,UAAU,EAAE;OACd,EAAU,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,UAAU,CACR,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC;IAIlC;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC;CAMpD;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;I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;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,0BAA2B,SAAQ,YAAY;CAAG;AAEnE,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH;AAED,OAAO,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -6,6 +6,20 @@ const resource_1 = require("../core/resource.js");
6
6
  const pagination_1 = require("../core/pagination.js");
7
7
  const path_1 = require("../internal/utils/path.js");
8
8
  class Audiences extends resource_1.APIResource {
9
+ /**
10
+ * Creates a new audience.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const audience = await client.audiences.create(
15
+ * 'acct_01j9a43avnfqzbjfch6pygv1td',
16
+ * { name: 'The Family' },
17
+ * );
18
+ * ```
19
+ */
20
+ create(accountID, body, options) {
21
+ return this._client.post((0, path_1.path) `/accounts/${accountID}/audiences`, { body, ...options });
22
+ }
9
23
  /**
10
24
  * Adds an existing contact to a manual audience.
11
25
  *
@@ -1 +1 @@
1
- {"version":3,"file":"audiences.js","sourceRoot":"","sources":["../src/resources/audiences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;OAUG;IACH,UAAU,CACR,UAAkB,EAClB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,UAAkB,EAClB,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,WAAW,EAAE,CAAA,mBAA2B,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,8BA4CC"}
1
+ {"version":3,"file":"audiences.js","sourceRoot":"","sources":["../src/resources/audiences.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CACR,UAAkB,EAClB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,UAAkB,EAClB,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,WAAW,EAAE,CAAA,mBAA2B,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA/DD,8BA+DC"}
@@ -3,6 +3,20 @@ import { APIResource } from "../core/resource.mjs";
3
3
  import { Cursor } from "../core/pagination.mjs";
4
4
  import { path } from "../internal/utils/path.mjs";
5
5
  export class Audiences extends APIResource {
6
+ /**
7
+ * Creates a new audience.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const audience = await client.audiences.create(
12
+ * 'acct_01j9a43avnfqzbjfch6pygv1td',
13
+ * { name: 'The Family' },
14
+ * );
15
+ * ```
16
+ */
17
+ create(accountID, body, options) {
18
+ return this._client.post(path `/accounts/${accountID}/audiences`, { body, ...options });
19
+ }
6
20
  /**
7
21
  * Adds an existing contact to a manual audience.
8
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"audiences.mjs","sourceRoot":"","sources":["../src/resources/audiences.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,UAAU,CACR,UAAkB,EAClB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,cAAc,UAAU,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,UAAkB,EAClB,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,cAAc,UAAU,WAAW,EAAE,CAAA,MAA2B,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"audiences.mjs","sourceRoot":"","sources":["../src/resources/audiences.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,SAAiB,EACjB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;OAUG;IACH,UAAU,CACR,UAAkB,EAClB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,cAAc,UAAU,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,UAAkB,EAClB,QAAuD,EAAE,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,cAAc,UAAU,WAAW,EAAE,CAAA,MAA2B,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -21,6 +21,8 @@ export declare class Campaigns extends APIResource {
21
21
  * 'Your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
22
22
  * ],
23
23
  * privacy_policy_url: 'https://fastauto.shop/sms-privacy',
24
+ * terms_and_conditions_url:
25
+ * 'https://fastauto.shop/terms-and-conditions',
24
26
  * use_cases: [
25
27
  * 'account_notification',
26
28
  * 'customer_care',
@@ -43,6 +45,40 @@ export declare class Campaigns extends APIResource {
43
45
  * ```
44
46
  */
45
47
  retrieve(id: string, options?: RequestOptions): APIPromise<Campaign>;
48
+ /**
49
+ * Updates a campaign that has not yet been approved. This can be used to fix
50
+ * issues flagged during review and resubmit the campaign. Returns an error if the
51
+ * campaign is currently in review, has already been approved, or has been
52
+ * deactivated.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const campaign = await client.campaigns.update(
57
+ * 'cpn_01k0qczvhbet4azgn5xm2ccfst',
58
+ * {
59
+ * consent_flow:
60
+ * 'When customers bring in their car for service, they will fill out this web form for intake: https://fastauto.shop/bp108c In it they can choose to opt in to text message notifications. If they choose to opt in, we will send them notifications to let them know if our mechanics find issues and once the car is ready to go, as well as links to invoices and to leave us feedback.',
61
+ * description:
62
+ * 'This phone number will send auto maintenance notifications to end users that have opted in. It will also be used for responding to customer inquiries and sending some marketing offers.',
63
+ * message_samples: [
64
+ * 'You are now opted in to receive repair notifications from DT Precision Auto. Frequency varies. Msg&data rates apply. Reply STOP to opt out.',
65
+ * "You're lucky that hundred shot of NOS didn't blow the welds on the intake!",
66
+ * 'Your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
67
+ * ],
68
+ * privacy_policy_url: 'https://fastauto.shop/sms-privacy',
69
+ * terms_and_conditions_url:
70
+ * 'https://fastauto.shop/terms-and-conditions',
71
+ * use_cases: [
72
+ * 'account_notification',
73
+ * 'customer_care',
74
+ * 'marketing',
75
+ * ],
76
+ * volume: 'high',
77
+ * },
78
+ * );
79
+ * ```
80
+ */
81
+ update(id: string, body: CampaignUpdateParams, options?: RequestOptions): APIPromise<Campaign>;
46
82
  /**
47
83
  * List all campaigns for an account with cursor-based pagination.
48
84
  *
@@ -201,6 +237,13 @@ export declare namespace CampaignCreateParams {
201
237
  * in to messaging.
202
238
  */
203
239
  privacy_policy_url: string;
240
+ /**
241
+ * The URL of the terms and conditions presented to end users when they opt in to
242
+ * messaging. These terms and conditions may be shared among all of a platform's
243
+ * customers if they're the terms that are presented to end users when they opt in
244
+ * to messaging.
245
+ */
246
+ terms_and_conditions_url: string;
204
247
  /**
205
248
  * A list containing 1-5 types of messages that will be sent with this campaign.
206
249
  *
@@ -263,13 +306,114 @@ export declare namespace CampaignCreateParams {
263
306
  * to disable automatic link shortening.
264
307
  */
265
308
  link_sample?: string;
309
+ }
310
+ interface ExternalCampaignParams {
311
+ /**
312
+ * The Campaign Registry (TCR) ID for the externally registered campaign
313
+ */
314
+ tcr_id: string;
315
+ }
316
+ }
317
+ export type CampaignUpdateParams = CampaignUpdateParams.StandardCampaignParams | CampaignUpdateParams.ExternalCampaignParams;
318
+ export declare namespace CampaignUpdateParams {
319
+ interface StandardCampaignParams {
320
+ /**
321
+ * A string explaining the method through which end users will opt in to receive
322
+ * messages from the brand. Typically this should include URLs for opt-in forms or
323
+ * screenshots that might be helpful in explaining the flow to someone unfamiliar
324
+ * with the organization's purpose.
325
+ */
326
+ consent_flow: string;
327
+ /**
328
+ * An explanation of the organization's purpose and how it will be using text
329
+ * messaging to accomplish that purpose.
330
+ */
331
+ description: string;
332
+ /**
333
+ * An array of 2-5 strings with examples of the messages that will be sent from
334
+ * this campaign. Typically the first sample should be a compliance message like
335
+ * `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
336
+ * These samples don't necessarily need to be the only templates that will be used
337
+ * for the campaign, but they should reflect the purpose of the messages that will
338
+ * be sent. Any variable content can be reflected by wrapping it in square brackets
339
+ * like `[customer name]`.
340
+ */
341
+ message_samples: Array<string>;
342
+ /**
343
+ * The URL of the privacy policy for the brand in question. This may be a shared
344
+ * privacy policy if it's the policy that is displayed to end users when they opt
345
+ * in to messaging.
346
+ */
347
+ privacy_policy_url: string;
266
348
  /**
267
349
  * The URL of the terms and conditions presented to end users when they opt in to
268
350
  * messaging. These terms and conditions may be shared among all of a platform's
269
351
  * customers if they're the terms that are presented to end users when they opt in
270
352
  * to messaging.
271
353
  */
272
- terms_and_conditions_url?: string;
354
+ terms_and_conditions_url: string;
355
+ /**
356
+ * A list containing 1-5 types of messages that will be sent with this campaign.
357
+ *
358
+ * The following use cases are typically available to all brands:
359
+ *
360
+ * - `account_notification` - For sending reminders, alerts, and general
361
+ * account-related notifications like booking confirmations or appointment
362
+ * reminders.
363
+ * - `customer_care` - For account support, troubleshooting, and general customer
364
+ * service communication.
365
+ * - `delivery_notification` - For notifying customers about the status of product
366
+ * or service deliveries.
367
+ * - `fraud_alert` - For warning customers about suspicious or potentially
368
+ * fraudulent activity.
369
+ * - `higher_education` - For messaging related to colleges, universities, and
370
+ * school districts outside of K–12.
371
+ * - `marketing` - For promotional or advertising messages intended to market
372
+ * products or services.
373
+ * - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
374
+ * - `public_service_announcement` - For raising awareness about social issues or
375
+ * important public information.
376
+ * - `security_alert` - For alerts related to potential security breaches or
377
+ * compromised systems requiring user action.
378
+ * - `two_factor_authentication` - For sending one-time passwords or verification
379
+ * codes for login or password reset.
380
+ *
381
+ * For access to special use cases not shown here, reach out to support@surge.app.
382
+ */
383
+ use_cases: Array<'account_notification' | 'customer_care' | 'delivery_notification' | 'fraud_alert' | 'higher_education' | 'marketing' | 'polling_voting' | 'public_service_announcement' | 'security_alert' | 'two_factor_authentication'>;
384
+ /**
385
+ * This will be one of the following:
386
+ *
387
+ * - `low` - The campaign will be allowed to send up to 2000 SMS segments to
388
+ * T-Mobile customers each day. In this case your platform will be charged for
389
+ * the setup fee for a low volume number upon receipt of the API request.
390
+ * - `high` - The campaign will be allowed to send up to 200k SMS segments to
391
+ * T-Mobile customers each day, depending on the trust score assigned by The
392
+ * Campaign Registry. Your platform will be charged for the setup fee for a high
393
+ * volume number upon receipt of the API request, and phone numbers will be
394
+ * charged as high volume numbers going forward.
395
+ */
396
+ volume: 'high' | 'low';
397
+ /**
398
+ * A list of properties that this campaign should include. These properties can be
399
+ * any of the following values:
400
+ *
401
+ * - `links` - whether the campaign might send links in messages
402
+ * - `phone_numbers` - whether the campaign might send phone numbers in messages
403
+ * - `age_gated` - whether the campaign contains age gated content (controlled
404
+ * substances or adult content)
405
+ * - `direct_lending` - whether the campaign contains content related to direct
406
+ * lending or other loan arrangements
407
+ */
408
+ includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
409
+ /**
410
+ * A sample link that might be sent by this campaign. If links from other domains
411
+ * are sent through this campaign, they are much more likely to be filtered by the
412
+ * carriers. If link shortening is enabled for the account, the link shortener URL
413
+ * will be used instead of what is provided. Reach out to support if you would like
414
+ * to disable automatic link shortening.
415
+ */
416
+ link_sample?: string;
273
417
  }
274
418
  interface ExternalCampaignParams {
275
419
  /**
@@ -281,6 +425,6 @@ export declare namespace CampaignCreateParams {
281
425
  export interface CampaignListParams extends CursorParams {
282
426
  }
283
427
  export declare namespace Campaigns {
284
- export { type Campaign as Campaign, type CampaignsCursor as CampaignsCursor, type CampaignCreateParams as CampaignCreateParams, type CampaignListParams as CampaignListParams, };
428
+ export { type Campaign as Campaign, type CampaignsCursor as CampaignsCursor, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, };
285
429
  }
286
430
  //# sourceMappingURL=campaigns.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"campaigns.d.mts","sourceRoot":"","sources":["../src/resources/campaigns.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIrG;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAIpE;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,QAAQ,CAAC;CAM1C;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAE/C;;;GAGG;AAC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your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
22
22
  * ],
23
23
  * privacy_policy_url: 'https://fastauto.shop/sms-privacy',
24
+ * terms_and_conditions_url:
25
+ * 'https://fastauto.shop/terms-and-conditions',
24
26
  * use_cases: [
25
27
  * 'account_notification',
26
28
  * 'customer_care',
@@ -43,6 +45,40 @@ export declare class Campaigns extends APIResource {
43
45
  * ```
44
46
  */
45
47
  retrieve(id: string, options?: RequestOptions): APIPromise<Campaign>;
48
+ /**
49
+ * Updates a campaign that has not yet been approved. This can be used to fix
50
+ * issues flagged during review and resubmit the campaign. Returns an error if the
51
+ * campaign is currently in review, has already been approved, or has been
52
+ * deactivated.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const campaign = await client.campaigns.update(
57
+ * 'cpn_01k0qczvhbet4azgn5xm2ccfst',
58
+ * {
59
+ * consent_flow:
60
+ * 'When customers bring in their car for service, they will fill out this web form for intake: https://fastauto.shop/bp108c In it they can choose to opt in to text message notifications. If they choose to opt in, we will send them notifications to let them know if our mechanics find issues and once the car is ready to go, as well as links to invoices and to leave us feedback.',
61
+ * description:
62
+ * 'This phone number will send auto maintenance notifications to end users that have opted in. It will also be used for responding to customer inquiries and sending some marketing offers.',
63
+ * message_samples: [
64
+ * 'You are now opted in to receive repair notifications from DT Precision Auto. Frequency varies. Msg&data rates apply. Reply STOP to opt out.',
65
+ * "You're lucky that hundred shot of NOS didn't blow the welds on the intake!",
66
+ * 'Your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
67
+ * ],
68
+ * privacy_policy_url: 'https://fastauto.shop/sms-privacy',
69
+ * terms_and_conditions_url:
70
+ * 'https://fastauto.shop/terms-and-conditions',
71
+ * use_cases: [
72
+ * 'account_notification',
73
+ * 'customer_care',
74
+ * 'marketing',
75
+ * ],
76
+ * volume: 'high',
77
+ * },
78
+ * );
79
+ * ```
80
+ */
81
+ update(id: string, body: CampaignUpdateParams, options?: RequestOptions): APIPromise<Campaign>;
46
82
  /**
47
83
  * List all campaigns for an account with cursor-based pagination.
48
84
  *
@@ -201,6 +237,13 @@ export declare namespace CampaignCreateParams {
201
237
  * in to messaging.
202
238
  */
203
239
  privacy_policy_url: string;
240
+ /**
241
+ * The URL of the terms and conditions presented to end users when they opt in to
242
+ * messaging. These terms and conditions may be shared among all of a platform's
243
+ * customers if they're the terms that are presented to end users when they opt in
244
+ * to messaging.
245
+ */
246
+ terms_and_conditions_url: string;
204
247
  /**
205
248
  * A list containing 1-5 types of messages that will be sent with this campaign.
206
249
  *
@@ -263,13 +306,114 @@ export declare namespace CampaignCreateParams {
263
306
  * to disable automatic link shortening.
264
307
  */
265
308
  link_sample?: string;
309
+ }
310
+ interface ExternalCampaignParams {
311
+ /**
312
+ * The Campaign Registry (TCR) ID for the externally registered campaign
313
+ */
314
+ tcr_id: string;
315
+ }
316
+ }
317
+ export type CampaignUpdateParams = CampaignUpdateParams.StandardCampaignParams | CampaignUpdateParams.ExternalCampaignParams;
318
+ export declare namespace CampaignUpdateParams {
319
+ interface StandardCampaignParams {
320
+ /**
321
+ * A string explaining the method through which end users will opt in to receive
322
+ * messages from the brand. Typically this should include URLs for opt-in forms or
323
+ * screenshots that might be helpful in explaining the flow to someone unfamiliar
324
+ * with the organization's purpose.
325
+ */
326
+ consent_flow: string;
327
+ /**
328
+ * An explanation of the organization's purpose and how it will be using text
329
+ * messaging to accomplish that purpose.
330
+ */
331
+ description: string;
332
+ /**
333
+ * An array of 2-5 strings with examples of the messages that will be sent from
334
+ * this campaign. Typically the first sample should be a compliance message like
335
+ * `You are now opted in to messages from {brand name}. Frequency varies. Msg&data rates apply. Reply STOP to opt out.`
336
+ * These samples don't necessarily need to be the only templates that will be used
337
+ * for the campaign, but they should reflect the purpose of the messages that will
338
+ * be sent. Any variable content can be reflected by wrapping it in square brackets
339
+ * like `[customer name]`.
340
+ */
341
+ message_samples: Array<string>;
342
+ /**
343
+ * The URL of the privacy policy for the brand in question. This may be a shared
344
+ * privacy policy if it's the policy that is displayed to end users when they opt
345
+ * in to messaging.
346
+ */
347
+ privacy_policy_url: string;
266
348
  /**
267
349
  * The URL of the terms and conditions presented to end users when they opt in to
268
350
  * messaging. These terms and conditions may be shared among all of a platform's
269
351
  * customers if they're the terms that are presented to end users when they opt in
270
352
  * to messaging.
271
353
  */
272
- terms_and_conditions_url?: string;
354
+ terms_and_conditions_url: string;
355
+ /**
356
+ * A list containing 1-5 types of messages that will be sent with this campaign.
357
+ *
358
+ * The following use cases are typically available to all brands:
359
+ *
360
+ * - `account_notification` - For sending reminders, alerts, and general
361
+ * account-related notifications like booking confirmations or appointment
362
+ * reminders.
363
+ * - `customer_care` - For account support, troubleshooting, and general customer
364
+ * service communication.
365
+ * - `delivery_notification` - For notifying customers about the status of product
366
+ * or service deliveries.
367
+ * - `fraud_alert` - For warning customers about suspicious or potentially
368
+ * fraudulent activity.
369
+ * - `higher_education` - For messaging related to colleges, universities, and
370
+ * school districts outside of K–12.
371
+ * - `marketing` - For promotional or advertising messages intended to market
372
+ * products or services.
373
+ * - `polling_voting` - For conducting surveys, polls, or voting-related messaging.
374
+ * - `public_service_announcement` - For raising awareness about social issues or
375
+ * important public information.
376
+ * - `security_alert` - For alerts related to potential security breaches or
377
+ * compromised systems requiring user action.
378
+ * - `two_factor_authentication` - For sending one-time passwords or verification
379
+ * codes for login or password reset.
380
+ *
381
+ * For access to special use cases not shown here, reach out to support@surge.app.
382
+ */
383
+ use_cases: Array<'account_notification' | 'customer_care' | 'delivery_notification' | 'fraud_alert' | 'higher_education' | 'marketing' | 'polling_voting' | 'public_service_announcement' | 'security_alert' | 'two_factor_authentication'>;
384
+ /**
385
+ * This will be one of the following:
386
+ *
387
+ * - `low` - The campaign will be allowed to send up to 2000 SMS segments to
388
+ * T-Mobile customers each day. In this case your platform will be charged for
389
+ * the setup fee for a low volume number upon receipt of the API request.
390
+ * - `high` - The campaign will be allowed to send up to 200k SMS segments to
391
+ * T-Mobile customers each day, depending on the trust score assigned by The
392
+ * Campaign Registry. Your platform will be charged for the setup fee for a high
393
+ * volume number upon receipt of the API request, and phone numbers will be
394
+ * charged as high volume numbers going forward.
395
+ */
396
+ volume: 'high' | 'low';
397
+ /**
398
+ * A list of properties that this campaign should include. These properties can be
399
+ * any of the following values:
400
+ *
401
+ * - `links` - whether the campaign might send links in messages
402
+ * - `phone_numbers` - whether the campaign might send phone numbers in messages
403
+ * - `age_gated` - whether the campaign contains age gated content (controlled
404
+ * substances or adult content)
405
+ * - `direct_lending` - whether the campaign contains content related to direct
406
+ * lending or other loan arrangements
407
+ */
408
+ includes?: Array<'links' | 'phone_numbers' | 'age_gated' | 'direct_lending'>;
409
+ /**
410
+ * A sample link that might be sent by this campaign. If links from other domains
411
+ * are sent through this campaign, they are much more likely to be filtered by the
412
+ * carriers. If link shortening is enabled for the account, the link shortener URL
413
+ * will be used instead of what is provided. Reach out to support if you would like
414
+ * to disable automatic link shortening.
415
+ */
416
+ link_sample?: string;
273
417
  }
274
418
  interface ExternalCampaignParams {
275
419
  /**
@@ -281,6 +425,6 @@ export declare namespace CampaignCreateParams {
281
425
  export interface CampaignListParams extends CursorParams {
282
426
  }
283
427
  export declare namespace Campaigns {
284
- export { type Campaign as Campaign, type CampaignsCursor as CampaignsCursor, type CampaignCreateParams as CampaignCreateParams, type CampaignListParams as CampaignListParams, };
428
+ export { type Campaign as Campaign, type CampaignsCursor as CampaignsCursor, type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, };
285
429
  }
286
430
  //# sourceMappingURL=campaigns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"campaigns.d.ts","sourceRoot":"","sources":["../src/resources/campaigns.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;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K,CAAC,OAAO,GAAG,eAAe,GAAG,WAAW,GAAG,gBAAgB,CAAC,CAAC;QAE7E;;;;;;WAMG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,UAAiB,sBAAsB;QACrC;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KAChB;CACF;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;CAAG;AAE3D,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -24,6 +24,8 @@ class Campaigns extends resource_1.APIResource {
24
24
  * 'Your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
25
25
  * ],
26
26
  * privacy_policy_url: 'https://fastauto.shop/sms-privacy',
27
+ * terms_and_conditions_url:
28
+ * 'https://fastauto.shop/terms-and-conditions',
27
29
  * use_cases: [
28
30
  * 'account_notification',
29
31
  * 'customer_care',
@@ -50,6 +52,42 @@ class Campaigns extends resource_1.APIResource {
50
52
  retrieve(id, options) {
51
53
  return this._client.get((0, path_1.path) `/campaigns/${id}`, options);
52
54
  }
55
+ /**
56
+ * Updates a campaign that has not yet been approved. This can be used to fix
57
+ * issues flagged during review and resubmit the campaign. Returns an error if the
58
+ * campaign is currently in review, has already been approved, or has been
59
+ * deactivated.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const campaign = await client.campaigns.update(
64
+ * 'cpn_01k0qczvhbet4azgn5xm2ccfst',
65
+ * {
66
+ * consent_flow:
67
+ * 'When customers bring in their car for service, they will fill out this web form for intake: https://fastauto.shop/bp108c In it they can choose to opt in to text message notifications. If they choose to opt in, we will send them notifications to let them know if our mechanics find issues and once the car is ready to go, as well as links to invoices and to leave us feedback.',
68
+ * description:
69
+ * 'This phone number will send auto maintenance notifications to end users that have opted in. It will also be used for responding to customer inquiries and sending some marketing offers.',
70
+ * message_samples: [
71
+ * 'You are now opted in to receive repair notifications from DT Precision Auto. Frequency varies. Msg&data rates apply. Reply STOP to opt out.',
72
+ * "You're lucky that hundred shot of NOS didn't blow the welds on the intake!",
73
+ * 'Your car is ready to go. See your invoice here: https://l.fastauto.shop/s034ij',
74
+ * ],
75
+ * privacy_policy_url: 'https://fastauto.shop/sms-privacy',
76
+ * terms_and_conditions_url:
77
+ * 'https://fastauto.shop/terms-and-conditions',
78
+ * use_cases: [
79
+ * 'account_notification',
80
+ * 'customer_care',
81
+ * 'marketing',
82
+ * ],
83
+ * volume: 'high',
84
+ * },
85
+ * );
86
+ * ```
87
+ */
88
+ update(id, body, options) {
89
+ return this._client.patch((0, path_1.path) `/campaigns/${id}`, { body, ...options });
90
+ }
53
91
  /**
54
92
  * List all campaigns for an account with cursor-based pagination.
55
93
  *
@@ -1 +1 @@
1
- {"version":3,"file":"campaigns.js","sourceRoot":"","sources":["../src/resources/campaigns.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,SAAiB,EAAE,IAA0B,EAAE,OAAwB;QAC5E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;OAYG;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