@gr4vy/sdk 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Activate a gift card
13
13
  *
14
14
  * @remarks
15
- * Activate a physical gift card through the primary gift card service.
15
+ * Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card.
16
16
  */
17
17
  export declare function giftCardsActivationsCreate(client: Gr4vyCore, giftCardActivationCreate: components.GiftCardActivationCreate, idempotencyKey?: string | null | undefined, merchantAccountId?: string | null | undefined, options?: RequestOptions): APIPromise<Result<components.GiftCard, errors.Error400 | errors.Error401 | errors.Error403 | errors.Error404 | errors.Error405 | errors.Error409 | errors.HTTPValidationError | errors.Error425 | errors.Error429 | errors.Error500 | errors.Error502 | errors.Error504 | Gr4vyError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=giftCardsActivationsCreate.d.ts.map
@@ -52,7 +52,7 @@ const async_js_1 = require("../types/async.js");
52
52
  * Activate a gift card
53
53
  *
54
54
  * @remarks
55
- * Activate a physical gift card through the primary gift card service.
55
+ * Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card.
56
56
  */
57
57
  function giftCardsActivationsCreate(client, giftCardActivationCreate, idempotencyKey, merchantAccountId, options) {
58
58
  return new async_js_1.APIPromise($do(client, giftCardActivationCreate, idempotencyKey, merchantAccountId, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gr4vy/sdk",
5
- "version": "2.4.0",
5
+ "version": "2.4.1",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/lib/config.d.ts CHANGED
@@ -44,8 +44,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
44
44
  export declare const SDK_METADATA: {
45
45
  readonly language: "typescript";
46
46
  readonly openapiDocVersion: "1.0.0";
47
- readonly sdkVersion: "2.4.0";
47
+ readonly sdkVersion: "2.4.1";
48
48
  readonly genVersion: "2.924.0";
49
- readonly userAgent: "speakeasy-sdk/typescript 2.4.0 2.924.0 1.0.0 @gr4vy/sdk";
49
+ readonly userAgent: "speakeasy-sdk/typescript 2.4.1 2.924.0 1.0.0 @gr4vy/sdk";
50
50
  };
51
51
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -37,8 +37,8 @@ function serverURLFromOptions(options) {
37
37
  exports.SDK_METADATA = {
38
38
  language: "typescript",
39
39
  openapiDocVersion: "1.0.0",
40
- sdkVersion: "2.4.0",
40
+ sdkVersion: "2.4.1",
41
41
  genVersion: "2.924.0",
42
- userAgent: "speakeasy-sdk/typescript 2.4.0 2.924.0 1.0.0 @gr4vy/sdk",
42
+ userAgent: "speakeasy-sdk/typescript 2.4.1 2.924.0 1.0.0 @gr4vy/sdk",
43
43
  };
44
44
  //# sourceMappingURL=config.js.map
@@ -23,6 +23,18 @@ export type GiftCardActivationCreate = {
23
23
  * An optional external identifier for this activation.
24
24
  */
25
25
  externalIdentifier?: string | null | undefined;
26
+ /**
27
+ * Whether to store the activated gift card in the vault. When `true`, a `pin` is required.
28
+ */
29
+ store?: boolean | undefined;
30
+ /**
31
+ * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this field is provided then the `buyer_external_identifier` field needs to be unset.
32
+ */
33
+ buyerId?: string | null | undefined;
34
+ /**
35
+ * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this field is provided then the `buyer_id` field needs to be unset.
36
+ */
37
+ buyerExternalIdentifier?: string | null | undefined;
26
38
  };
27
39
  /** @internal */
28
40
  export type GiftCardActivationCreate$Outbound = {
@@ -31,6 +43,9 @@ export type GiftCardActivationCreate$Outbound = {
31
43
  amount?: number | null | undefined;
32
44
  currency?: string | null | undefined;
33
45
  external_identifier?: string | null | undefined;
46
+ store: boolean;
47
+ buyer_id?: string | null | undefined;
48
+ buyer_external_identifier?: string | null | undefined;
34
49
  };
35
50
  /** @internal */
36
51
  export declare const GiftCardActivationCreate$outboundSchema: z.ZodType<GiftCardActivationCreate$Outbound, z.ZodTypeDef, GiftCardActivationCreate>;
@@ -1 +1 @@
1
- {"version":3,"file":"giftcardactivationcreate.d.ts","sourceRoot":"","sources":["../../src/models/components/giftcardactivationcreate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAChD,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACjD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAWxB,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR"}
1
+ {"version":3,"file":"giftcardactivationcreate.d.ts","sourceRoot":"","sources":["../../src/models/components/giftcardactivationcreate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAgBxB,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR"}
@@ -47,9 +47,14 @@ exports.GiftCardActivationCreate$outboundSchema = z.object({
47
47
  amount: z.nullable(z.number().int()).optional(),
48
48
  currency: z.nullable(z.string()).optional(),
49
49
  externalIdentifier: z.nullable(z.string()).optional(),
50
+ store: z.boolean().default(false),
51
+ buyerId: z.nullable(z.string()).optional(),
52
+ buyerExternalIdentifier: z.nullable(z.string()).optional(),
50
53
  }).transform((v) => {
51
54
  return (0, primitives_js_1.remap)(v, {
52
55
  externalIdentifier: "external_identifier",
56
+ buyerId: "buyer_id",
57
+ buyerExternalIdentifier: "buyer_external_identifier",
53
58
  });
54
59
  });
55
60
  function giftCardActivationCreateToJSON(giftCardActivationCreate) {
@@ -1 +1 @@
1
- {"version":3,"file":"giftcardactivationcreate.js","sourceRoot":"","sources":["../../src/models/components/giftcardactivationcreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDH,wEAMC;AA7DD,0CAA4B;AAC5B,2DAA0D;AAqC1D,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC/C,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,M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AC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1C,uBAAuB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,kBAAkB,EAAE,qBAAqB;QACzC,OAAO,EAAE,UAAU;QACnB,uBAAuB,EAAE,2BAA2B;KACrD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,8BAA8B,CAC5C,wBAAkD;IAElD,OAAO,IAAI,CAAC,SAAS,CACnB,+CAAuC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACxE,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gr4vy/sdk",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "author": "Gr4vy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
@@ -5,7 +5,7 @@ export declare class Activations extends ClientSDK {
5
5
  * Activate a gift card
6
6
  *
7
7
  * @remarks
8
- * Activate a physical gift card through the primary gift card service.
8
+ * Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card.
9
9
  */
10
10
  create(giftCardActivationCreate: components.GiftCardActivationCreate, idempotencyKey?: string | null | undefined, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.GiftCard>;
11
11
  }
@@ -12,7 +12,7 @@ class Activations extends sdks_js_1.ClientSDK {
12
12
  * Activate a gift card
13
13
  *
14
14
  * @remarks
15
- * Activate a physical gift card through the primary gift card service.
15
+ * Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card.
16
16
  */
17
17
  async create(giftCardActivationCreate, idempotencyKey, merchantAccountId, options) {
18
18
  return (0, fp_js_1.unwrapAsync)((0, giftCardsActivationsCreate_js_1.giftCardsActivationsCreate)(this, giftCardActivationCreate, idempotencyKey, merchantAccountId, options));
@@ -31,7 +31,7 @@ import { Result } from "../types/fp.js";
31
31
  * Activate a gift card
32
32
  *
33
33
  * @remarks
34
- * Activate a physical gift card through the primary gift card service.
34
+ * Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card.
35
35
  */
36
36
  export function giftCardsActivationsCreate(
37
37
  client: Gr4vyCore,
package/src/lib/config.ts CHANGED
@@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
77
77
  export const SDK_METADATA = {
78
78
  language: "typescript",
79
79
  openapiDocVersion: "1.0.0",
80
- sdkVersion: "2.4.0",
80
+ sdkVersion: "2.4.1",
81
81
  genVersion: "2.924.0",
82
- userAgent: "speakeasy-sdk/typescript 2.4.0 2.924.0 1.0.0 @gr4vy/sdk",
82
+ userAgent: "speakeasy-sdk/typescript 2.4.1 2.924.0 1.0.0 @gr4vy/sdk",
83
83
  } as const;
@@ -29,6 +29,18 @@ export type GiftCardActivationCreate = {
29
29
  * An optional external identifier for this activation.
30
30
  */
31
31
  externalIdentifier?: string | null | undefined;
32
+ /**
33
+ * Whether to store the activated gift card in the vault. When `true`, a `pin` is required.
34
+ */
35
+ store?: boolean | undefined;
36
+ /**
37
+ * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this field is provided then the `buyer_external_identifier` field needs to be unset.
38
+ */
39
+ buyerId?: string | null | undefined;
40
+ /**
41
+ * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this field is provided then the `buyer_id` field needs to be unset.
42
+ */
43
+ buyerExternalIdentifier?: string | null | undefined;
32
44
  };
33
45
 
34
46
  /** @internal */
@@ -38,6 +50,9 @@ export type GiftCardActivationCreate$Outbound = {
38
50
  amount?: number | null | undefined;
39
51
  currency?: string | null | undefined;
40
52
  external_identifier?: string | null | undefined;
53
+ store: boolean;
54
+ buyer_id?: string | null | undefined;
55
+ buyer_external_identifier?: string | null | undefined;
41
56
  };
42
57
 
43
58
  /** @internal */
@@ -51,9 +66,14 @@ export const GiftCardActivationCreate$outboundSchema: z.ZodType<
51
66
  amount: z.nullable(z.number().int()).optional(),
52
67
  currency: z.nullable(z.string()).optional(),
53
68
  externalIdentifier: z.nullable(z.string()).optional(),
69
+ store: z.boolean().default(false),
70
+ buyerId: z.nullable(z.string()).optional(),
71
+ buyerExternalIdentifier: z.nullable(z.string()).optional(),
54
72
  }).transform((v) => {
55
73
  return remap$(v, {
56
74
  externalIdentifier: "external_identifier",
75
+ buyerId: "buyer_id",
76
+ buyerExternalIdentifier: "buyer_external_identifier",
57
77
  });
58
78
  });
59
79
 
@@ -12,7 +12,7 @@ export class Activations extends ClientSDK {
12
12
  * Activate a gift card
13
13
  *
14
14
  * @remarks
15
- * Activate a physical gift card through the primary gift card service.
15
+ * Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card.
16
16
  */
17
17
  async create(
18
18
  giftCardActivationCreate: components.GiftCardActivationCreate,